From: Felix Fietkau Date: Mon, 19 Aug 2024 15:06:21 +0000 (+0200) Subject: udp: fix receiving fraglist GSO packets X-Git-Tag: v6.10.7~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9d567f92123b92a837f5f2592265fca930245ef;p=thirdparty%2Fkernel%2Fstable.git udp: fix receiving fraglist GSO packets [ Upstream commit b128ed5ab27330deeeaf51ea8bb69f1442a96f7f ] When assembling fraglist GSO packets, udp4_gro_complete does not set skb->csum_start, which makes the extra validation in __udp_gso_segment fail. Fixes: 89add40066f9 ("net: drop bad gso csum_start and offset in virtio_net_hdr") Signed-off-by: Felix Fietkau Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20240819150621.59833-1-nbd@nbd.name Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index ee9af921556a7..5b54f4f32b1cd 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -279,7 +279,8 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb, return ERR_PTR(-EINVAL); if (unlikely(skb_checksum_start(gso_skb) != - skb_transport_header(gso_skb))) + skb_transport_header(gso_skb) && + !(skb_shinfo(gso_skb)->gso_type & SKB_GSO_FRAGLIST))) return ERR_PTR(-EINVAL); if (skb_gso_ok(gso_skb, features | NETIF_F_GSO_ROBUST)) {