lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211223191922.4a5cabc4@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date:   Thu, 23 Dec 2021 19:19:22 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Coco Li <lixiaoyan@...gle.com>,
        Willem de Bruijn <willemb@...gle.com>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH net 1/2] udp: using datalen to cap ipv6 udp max gso
 segments

On Thu, 23 Dec 2021 22:24:40 +0000 Coco Li wrote:
> The max number of UDP gso segments is intended to cap to
> UDP_MAX_SEGMENTS, this is checked in udp_send_skb().
> 
> skb->len contains network and transport header len here, we should use
> only data len instead.
> 
> This is the ipv6 counterpart to the below referenced commit,
> which missed the ipv6 change
> 
> Fixes: 158390e45612 ("udp: using datalen to cap max gso segments")

I'm gonna replace the Fixes tag with:

Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")

hope that's okay.

> Signed-off-by: Coco Li <lixiaoyan@...gle.com>
> Reviewed-by: Willem de Bruijn <willemb@...gle.com>
> ---
>  net/ipv6/udp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index a2caca6ccf11..8cde9efd7919 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -1204,7 +1204,7 @@ static int udp_v6_send_skb(struct sk_buff *skb, struct flowi6 *fl6,
>  			kfree_skb(skb);
>  			return -EINVAL;
>  		}
> -		if (skb->len > cork->gso_size * UDP_MAX_SEGMENTS) {
> +		if (datalen > cork->gso_size * UDP_MAX_SEGMENTS) {
>  			kfree_skb(skb);
>  			return -EINVAL;
>  		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ