linux-stable/net
Yan Zhai fae5cc598e ipv6: avoid atomic fragment on GSO packets
[ Upstream commit 03d6c848bf ]

When the ipv6 stack output a GSO packet, if its gso_size is larger than
dst MTU, then all segments would be fragmented. However, it is possible
for a GSO packet to have a trailing segment with smaller actual size
than both gso_size as well as the MTU, which leads to an "atomic
fragment". Atomic fragments are considered harmful in RFC-8021. An
Existing report from APNIC also shows that atomic fragments are more
likely to be dropped even it is equivalent to a no-op [1].

Add an extra check in the GSO slow output path. For each segment from
the original over-sized packet, if it fits with the path MTU, then avoid
generating an atomic fragment.

Link: https://www.potaroo.net/presentations/2022-03-01-ipv6-frag.pdf [1]
Fixes: b210de4f8c ("net: ipv6: Validate GSO SKB before finish IPv6 processing")
Reported-by: David Wragg <dwragg@cloudflare.com>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Link: https://lore.kernel.org/r/90912e3503a242dca0bc36958b11ed03a2696e5e.1698156966.git.yan@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:51:55 +01:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err 2023-11-20 11:51:55 +01:00
bpf
bpfilter
bridge neighbour: fix data-races around n->output 2023-10-10 22:00:42 +02:00
caif
can can: isotp: isotp_sendmsg(): fix TX state detection and wait behavior 2023-10-19 23:08:52 +02:00
ceph libceph: use kernel_connect() 2023-10-19 23:08:56 +02:00
core net: skb_find_text: Ignore patterns extending past 'to' 2023-11-20 11:51:54 +01:00
dcb
dccp dccp: fix dccp_v4_err()/dccp_v6_err() again 2023-10-06 14:56:39 +02:00
devlink devlink: remove reload failed checks in params get/set callbacks 2023-09-23 11:11:01 +02:00
dns_resolver
dsa
ethernet
ethtool ipv6: Remove in6addr_any alternatives. 2023-09-19 12:28:10 +02:00
hsr net: hsr: Add __packed to struct hsr_sup_tlv. 2023-10-06 14:56:57 +02:00
ieee802154
ife
ipv4 tcp: fix cookie_init_timestamp() overflows 2023-11-20 11:51:54 +01:00
ipv6 ipv6: avoid atomic fragment on GSO packets 2023-11-20 11:51:55 +01:00
iucv
kcm kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg(). 2023-09-19 12:28:10 +02:00
key
l2tp ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data() 2023-10-10 22:00:42 +02:00
l3mdev
lapb
llc
mac80211 wifi: mac80211: fix # of MSDU in A-MSDU calculation 2023-11-20 11:51:51 +01:00
mac802154
mctp mctp: perform route lookups under a RCU read-side lock 2023-10-19 23:08:57 +02:00
mpls
mptcp mptcp: avoid sending RST when closing the initial subflow 2023-10-25 12:03:16 +02:00
ncsi ncsi: Propagate carrier gain/loss events to the NCSI controller 2023-10-06 14:56:57 +02:00
netfilter netfilter: nf_tables: Drop pointless memset when dumping rules 2023-11-20 11:51:54 +01:00
netlabel
netlink netlink: remove the flex array from struct nlmsghdr 2023-10-10 22:00:46 +02:00
netrom
nfc nfc: nci: fix possible NULL pointer dereference in send_acknowledge() 2023-10-25 12:03:04 +02:00
nsh
openvswitch
packet
phonet
psample
qrtr
rds net: prevent address rewrite in kernel_bind() 2023-10-19 23:08:50 +02:00
rfkill net: rfkill: gpio: prevent value glitch during probe 2023-10-25 12:03:06 +02:00
rose
rxrpc
sched net: sched: cls_u32: Fix allocation size in u32_init() 2023-11-08 14:10:57 +01:00
sctp sctp: update hb timer immediately after users change hb_interval 2023-10-10 22:00:44 +02:00
smc net/smc: fix smc clc failed issue when netdevice not in init_net 2023-10-25 12:03:13 +02:00
strparser
sunrpc Revert "SUNRPC dont update timeout value on connection reset" 2023-10-06 14:57:03 +02:00
switchdev
tipc tipc: Use size_add() in calls to struct_size() 2023-11-20 11:51:52 +01:00
tls tls: Use size_add() in call to struct_size() 2023-11-20 11:51:52 +01:00
unix af_unix: Fix data-race around unix_tot_inflight. 2023-09-19 12:28:02 +02:00
vmw_vsock vsock/virtio: initialize the_virtio_vsock before using VQs 2023-11-02 09:35:23 +01:00
wireless wifi: cfg80211: add flush functions for wiphy work 2023-11-20 11:51:51 +01:00
x25
xdp
xfrm net: xfrm: skip policies marked as dead while reinserting policies 2023-10-25 12:03:12 +02:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c net: prevent address rewrite in kernel_bind() 2023-10-19 23:08:50 +02:00
sysctl_net.c