]> www.infradead.org Git - users/hch/configfs.git/commitdiff
udp: fix receiving fraglist GSO packets
authorFelix Fietkau <nbd@nbd.name>
Mon, 19 Aug 2024 15:06:21 +0000 (17:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Aug 2024 00:15:05 +0000 (17:15 -0700)
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 <nbd@nbd.name>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240819150621.59833-1-nbd@nbd.name
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/udp_offload.c

index b254a5dadfcf3f42e3ebb3aa35688a5619d9b4e0..d842303587af93fc58454c0a2da1b6f70c55eec8 100644 (file)
@@ -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);
 
        /* We don't know if egress device can segment and checksum the packet