From 9aa887b540cb2ee0bb7536e370e67d4a6a9f9d72 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Fri, 26 Jun 2020 15:34:52 -0400 Subject: [PATCH] Drop duplicate net-be-more-gentle-about-silly-gso-requests-coming-f.patch Signed-off-by: Sasha Levin --- ...le-about-silly-gso-requests-coming-f.patch | 74 ------------------- queue-4.14/series | 1 - ...le-about-silly-gso-requests-coming-f.patch | 74 ------------------- queue-4.19/series | 1 - 4 files changed, 150 deletions(-) delete mode 100644 queue-4.14/net-be-more-gentle-about-silly-gso-requests-coming-f.patch delete mode 100644 queue-4.19/net-be-more-gentle-about-silly-gso-requests-coming-f.patch diff --git a/queue-4.14/net-be-more-gentle-about-silly-gso-requests-coming-f.patch b/queue-4.14/net-be-more-gentle-about-silly-gso-requests-coming-f.patch deleted file mode 100644 index 50b3592524d..00000000000 --- a/queue-4.14/net-be-more-gentle-about-silly-gso-requests-coming-f.patch +++ /dev/null @@ -1,74 +0,0 @@ -From a7356cc9ba83132190ec15a1e27f7e84b37f6ceb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 May 2020 14:57:47 -0700 -Subject: net: be more gentle about silly gso requests coming from user - -From: Eric Dumazet - -[ Upstream commit 7c6d2ecbda83150b2036a2b36b21381ad4667762 ] - -Recent change in virtio_net_hdr_to_skb() broke some packetdrill tests. - -When --mss=XXX option is set, packetdrill always provide gso_type & gso_size -for its inbound packets, regardless of packet size. - - if (packet->tcp && packet->mss) { - if (packet->ipv4) - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV4; - else - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; - gso.gso_size = packet->mss; - } - -Since many other programs could do the same, relax virtio_net_hdr_to_skb() -to no longer return an error, but instead ignore gso settings. - -This keeps Willem intent to make sure no malicious packet could -reach gso stack. - -Note that TCP stack has a special logic in tcp_set_skb_tso_segs() -to clear gso_size for small packets. - -Fixes: 6dd912f82680 ("net: check untrusted gso_size at kernel entry") -Signed-off-by: Eric Dumazet -Cc: Willem de Bruijn -Acked-by: Willem de Bruijn -Signed-off-by: David S. Miller -Signed-off-by: Sasha Levin ---- - include/linux/virtio_net.h | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h -index a16e0bdf77511..d19bfdcf77498 100644 ---- a/include/linux/virtio_net.h -+++ b/include/linux/virtio_net.h -@@ -107,16 +107,17 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, - - if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { - u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size); -+ struct skb_shared_info *shinfo = skb_shinfo(skb); - -- if (skb->len - p_off <= gso_size) -- return -EINVAL; -- -- skb_shinfo(skb)->gso_size = gso_size; -- skb_shinfo(skb)->gso_type = gso_type; -+ /* Too small packets are not really GSO ones. */ -+ if (skb->len - p_off > gso_size) { -+ shinfo->gso_size = gso_size; -+ shinfo->gso_type = gso_type; - -- /* Header must be checked, and gso_segs computed. */ -- skb_shinfo(skb)->gso_type |= SKB_GSO_DODGY; -- skb_shinfo(skb)->gso_segs = 0; -+ /* Header must be checked, and gso_segs computed. */ -+ shinfo->gso_type |= SKB_GSO_DODGY; -+ shinfo->gso_segs = 0; -+ } - } - - return 0; --- -2.25.1 - diff --git a/queue-4.14/series b/queue-4.14/series index df8f1158998..79ee29a6c6c 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -2,5 +2,4 @@ scsi-scsi_devinfo-handle-non-terminated-strings.patch net-be-more-gentle-about-silly-gso-requests-coming-from-user.patch block-bio-integrity-don-t-free-buf-if-bio_integrity_add_page-failed.patch net-sched-export-__netdev_watchdog_up.patch -net-be-more-gentle-about-silly-gso-requests-coming-f.patch fix-a-braino-in-sparc32-fix-register-window-handling.patch diff --git a/queue-4.19/net-be-more-gentle-about-silly-gso-requests-coming-f.patch b/queue-4.19/net-be-more-gentle-about-silly-gso-requests-coming-f.patch deleted file mode 100644 index 8ce01125536..00000000000 --- a/queue-4.19/net-be-more-gentle-about-silly-gso-requests-coming-f.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 6de89f46d574a79357859fa1f4f9005bda8c7edf Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 28 May 2020 14:57:47 -0700 -Subject: net: be more gentle about silly gso requests coming from user - -From: Eric Dumazet - -[ Upstream commit 7c6d2ecbda83150b2036a2b36b21381ad4667762 ] - -Recent change in virtio_net_hdr_to_skb() broke some packetdrill tests. - -When --mss=XXX option is set, packetdrill always provide gso_type & gso_size -for its inbound packets, regardless of packet size. - - if (packet->tcp && packet->mss) { - if (packet->ipv4) - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV4; - else - gso.gso_type = VIRTIO_NET_HDR_GSO_TCPV6; - gso.gso_size = packet->mss; - } - -Since many other programs could do the same, relax virtio_net_hdr_to_skb() -to no longer return an error, but instead ignore gso settings. - -This keeps Willem intent to make sure no malicious packet could -reach gso stack. - -Note that TCP stack has a special logic in tcp_set_skb_tso_segs() -to clear gso_size for small packets. - -Fixes: 6dd912f82680 ("net: check untrusted gso_size at kernel entry") -Signed-off-by: Eric Dumazet -Cc: Willem de Bruijn -Acked-by: Willem de Bruijn -Signed-off-by: David S. Miller -Signed-off-by: Sasha Levin ---- - include/linux/virtio_net.h | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h -index 1c296f370e461..f32fe7080d2ec 100644 ---- a/include/linux/virtio_net.h -+++ b/include/linux/virtio_net.h -@@ -109,16 +109,17 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, - - if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { - u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size); -+ struct skb_shared_info *shinfo = skb_shinfo(skb); - -- if (skb->len - p_off <= gso_size) -- return -EINVAL; -- -- skb_shinfo(skb)->gso_size = gso_size; -- skb_shinfo(skb)->gso_type = gso_type; -+ /* Too small packets are not really GSO ones. */ -+ if (skb->len - p_off > gso_size) { -+ shinfo->gso_size = gso_size; -+ shinfo->gso_type = gso_type; - -- /* Header must be checked, and gso_segs computed. */ -- skb_shinfo(skb)->gso_type |= SKB_GSO_DODGY; -- skb_shinfo(skb)->gso_segs = 0; -+ /* Header must be checked, and gso_segs computed. */ -+ shinfo->gso_type |= SKB_GSO_DODGY; -+ shinfo->gso_segs = 0; -+ } - } - - return 0; --- -2.25.1 - diff --git a/queue-4.19/series b/queue-4.19/series index db3738e8a5f..0a0113aaef5 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -4,7 +4,6 @@ fanotify-fix-ignore-mask-logic-for-events-on-child-and-on-dir.patch mtd-rawnand-marvell-fix-the-condition-on-a-return-co.patch net-bcmgenet-remove-hfb_ctrl-access.patch net-sched-export-__netdev_watchdog_up.patch -net-be-more-gentle-about-silly-gso-requests-coming-f.patch edac-amd64-add-family-17h-model-30h-pci-ids.patch ib-mlx5-fix-devx-support-for-mlx5_cmd_op_init2init_q.patch i2c-tegra-cleanup-kerneldoc-comments.patch -- 2.47.3