Patch "udp: using datalen to cap ipv6 udp max gso segments" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    udp: using datalen to cap ipv6 udp max gso segments

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     udp-using-datalen-to-cap-ipv6-udp-max-gso-segments.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1587073fcd199f7fa580a8b8f1e4b5175ba690bf
Author: Coco Li <lixiaoyan@xxxxxxxxxx>
Date:   Thu Dec 23 22:24:40 2021 +0000

    udp: using datalen to cap ipv6 udp max gso segments
    
    [ Upstream commit 736ef37fd9a44f5966e25319d08ff7ea99ac79e8 ]
    
    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")
    Signed-off-by: Coco Li <lixiaoyan@xxxxxxxxxx>
    Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20211223222441.2975883-1-lixiaoyan@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 7bee95d8d2df0..8cd8c0bce0986 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;
 		}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux