linux/include
Alice Mikityanska c27c449d45 virtio-net: Ensure that TCP packets don't overflow gso_segs
The user can specify any gso_size in a packet crafted with an AF_PACKET
PACKET_VNET_HDR socket, even smaller than TCP_MIN_GSO_SIZE = 8. At the
same time, GSO_MAX_SIZE = 8 * GSO_MAX_SEGS = 8 * 65535. When the user
crafts a packet with gso_size < 8, there is a risk for partial GSO to
overflow the 16-bit gso_segs field when dividing the SKB length by
gso_size.

Adjust gso_size of TCP packets to be at least TCP_MIN_GSO_SIZE = 8. Keep
gso_size of UDP GSO packets, as gso_size=1 is valid and explicitly
tested at tools/testing/selftests/net/tun.c:649.

Fixes: 7c6d2ecbda ("net: be more gentle about silly gso requests coming from user")
Signed-off-by: Alice Mikityanska <alice@isovalent.com>
Suggested-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260822120117.1163423-2-alice.kernel@fastmail.im
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-27 15:47:17 +02:00
..
acpi Driver core changes for 7.3-rc1 2026-08-19 10:42:18 -07:00
asm-generic audit/stable-7.3 PR 20260814 2026-08-19 16:21:32 -07:00
clocksource clocksource/drivers/samsung_pwm: Switch to raw_spinlock_t type 2026-08-13 18:13:15 +02:00
crypto This update includes the following changes: 2026-08-19 17:25:42 -07:00
cxl
drm Revert "drm/sched: Remove FIFO and RR and simplify to a single run queue" 2026-08-11 17:34:10 +01:00
dt-bindings sound updates for 7.3-rc1 2026-08-19 10:04:59 -07:00
hyperv
keys
kunit gpio updates for v7.3-rc1 2026-08-19 09:10:07 -07:00
kvm
linux virtio-net: Ensure that TCP packets don't overflow gso_segs 2026-08-27 15:47:17 +02:00
math-emu
media media: rppx1: Add framework to support Dreamchip RPPX1 ISP 2026-07-30 20:51:35 +03:00
memory
misc
net sctp: fix stream->outcnt underflow on duplicate RECONF responses 2026-08-25 13:33:08 +02:00
pcmcia
ras
rdma
rv rv: Add KUnit tests for some LTL monitors 2026-07-31 16:27:46 +02:00
scsi ata changes for 7.3 2026-08-19 12:31:50 -07:00
soc regulator: Updates for v7.3 2026-08-19 09:36:58 -07:00
sound ASoC: Updates for v7.3 2026-08-18 08:35:39 +02:00
target
trace Networking changes for 7.3. 2026-08-20 08:16:04 -07:00
uapi xsk: align TX metadata layout across ABIs 2026-08-24 11:11:59 -07:00
ufs
vdso vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAY 2026-08-10 16:25:21 +02:00
video
xen xen: Drop CONFIG_XEN_AUTO_XLATE 2026-08-06 13:18:32 +02:00
Kbuild