linux/drivers/net/ethernet
Eric Dumazet 296c83b5cc gve: DQO: reject TSO packets with an out of range MSS
gve_prep_tso() notes that the device requires the MSS to be <= 9728,
but does not enforce it, assuming the 9K MTU enforced by the hypervisor
and the 64KB limit on TSO sizes are enough.

This does not hold for packets that were not generated locally.
A guest behind a tap, or any packet socket user, can provide an
arbitrary gso_size in virtio_net_hdr. Layer 2 forwarding does not check
the MTU for GSO packets (is_skb_forwardable()), and gso_features_check()
only bounds skb->len and gso_segs, never gso_size.

Such a packet reaches gve_tx_fill_tso_ctx_desc(), which puts gso_size
into the mss field of the TSO context descriptor. This field is 14 bits
wide, so a gso_size of 16384 is silently turned into an MSS of zero.

Drop these packets from gve_prep_tso(), and make sure that
gve_features_check_dqo() leaves their GSO bits alone: skb_segment()
splits at gso_size regardless of the MTU, so falling back to software
segmentation would give the device non TSO packets bigger than the
9728 bytes it supports.

Note that the device can still be given oversized non TSO packets when
the stack segments in software for other reasons, for instance after
TSO has been disabled with ethtool. This is a generic issue, because
the MTU check is skipped for GSO packets in the forwarding path, and
is addressed separately.

Fixes: a57e5de476 ("gve: DQO: Add TX path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20260924004252.1196328-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-24 10:56:59 -07:00
..
3com
8390
actions
adaptec
adi
aeroflex
agere et131x: propagate EEPROM readiness errors 2026-08-10 17:40:51 -07:00
airoha net: airoha: npu: cancel wdt_work after releasing the WDT IRQ 2026-09-23 19:16:30 -07:00
alacritech
alibaba treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
allwinner net: sun4i-emac: fix missing of_node_put() for phy_node 2026-09-10 12:22:01 +02:00
altera
amazon net: ena: fix MMIO read buffer leak on probe failure 2026-09-24 09:57:55 -07:00
amd Nothing too exciting, usual stream of fixes. 2026-09-10 14:07:48 -07:00
apm
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-08-06 11:53:47 -07:00
arc
asix
atheros net: atl1: fix soft lockup on out-of-range cmb_tpd_next_to_clean read 2026-09-24 12:41:10 +02:00
broadcom net: bcmgenet: mask DMA_TIMEOUT_MASK when reading DMA_RING0_TIMEOUT 2026-09-23 19:07:06 -07:00
brocade bna: prevent IOC timer rearm during teardown 2026-09-24 13:01:11 +02:00
cadence net: macb: fix dma_alloc_coherent() leak on macb_alloc() error paths 2026-09-22 13:33:50 +02:00
calxeda
cavium
chelsio net: add READ_ONCE()/WRITE_ONCE() annotations for dev->num_tc 2026-08-17 10:27:48 -07:00
cirrus
cisco Nothing too exciting, usual stream of fixes. 2026-09-10 14:07:48 -07:00
cortina net: ethernet: cortina: Ack RX overrun interrupt correctly 2026-09-16 17:44:40 -07:00
davicom
dec net: tulip: remove xircom_cb driver 2026-08-05 18:33:46 -07:00
dlink
emulex
engleder
ezchip
faraday
freescale fsl/fman: Fix clk reference leak in read_dts_node() 2026-09-22 12:31:26 +02:00
fungible net/funeth: switch to higher-level allocator API 2026-07-30 19:40:43 -07:00
google gve: DQO: reject TSO packets with an out of range MSS 2026-09-24 10:56:59 -07:00
hisilicon net: hisilicon: hns_dsaf_mac: fix mdio device leak in hns_mac_register_phy() 2026-09-22 13:13:10 +02:00
huawei net: hinic: fix mailbox segment buffer overflow 2026-09-10 12:37:09 +02:00
i825xx
ibm net: emac: move setting of netops to fix crash 2026-09-24 15:37:47 +02:00
intel Nothing too exciting, usual stream of fixes. 2026-09-10 14:07:48 -07:00
litex
marvell octeontx2-af: Fix memory scaling limitation in SR-IOV mode 2026-09-21 16:17:10 -07:00
mediatek net: ethernet: mtk_eth_soc: unregister net_devices in case of probe failure 2026-09-18 16:51:28 -07:00
mellanox net/mlx5: Fix rev_entry reference leak in mlx5_tc_ct_shared_counter_get() 2026-09-22 18:10:17 -07:00
meta eth: fbnic: Avoid rounding zero ring sizes 2026-09-22 18:53:11 -07:00
micrel net: ks8851: Fix receiver error in 100BASE-TX mode following software power-down 2026-09-09 18:04:05 -07:00
microchip net: lan743x: fix RX checksum use-after-free 2026-09-16 17:26:40 -07:00
microsoft Nothing too exciting, usual stream of fixes. 2026-09-10 14:07:48 -07:00
moxa
mscc
mucse
myricom
natsemi
netronome nfp: hold IPsec RX state under the XArray lock 2026-09-24 09:59:32 -07:00
ni
nvidia forcedeth: stop the tx_timeout register dump past the requested window 2026-08-20 12:24:44 -07:00
nxp
oki-semi
pasemi
pensando ionic: use netif_txq_maybe_stop() in ionic_tx() 2026-09-04 15:50:51 -07:00
qlogic qede: Fix NULL pointer dereference in TPA fragment processing 2026-08-22 13:23:02 -07:00
qualcomm net: qualcomm: rmnet: restore skb->dev on deaggregated frames 2026-08-24 11:42:16 -07:00
rdc
realtek Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-08-18 10:42:41 -07:00
renesas net: ethernet: renesas: rswitch: fix device_node refcount leak in rswitch_get_port_node() 2026-08-24 11:58:22 -07:00
rocker
samsung Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-07-30 12:53:19 -07:00
seeq
sfc sfc: add X4D PF support 2026-09-18 16:52:12 -07:00
sgi
silan
sis
smsc
socionext net: netsec: fix device_node reference leak on phy_np 2026-09-16 17:32:15 -07:00
spacemit net: spacemit: clear TX descriptor on fragment mapping failure 2026-09-22 13:02:35 +02:00
stmicro net: ethernet: stmmac: dwmac-rk: fix bulk clock leak when the PHY clock fails 2026-09-24 10:47:24 -07:00
sun net: niu: fix potential buffer overflow/truncation in irq names 2026-08-07 16:41:01 -07:00
sunplus
synopsys
tehuti
ti net: ethernet: ti: netcp: fix pm_runtime usage counter leak on error 2026-09-22 13:10:01 +02:00
toshiba
tundra
vertexcom
via
wangxun net: libwx: fix races in Tx timestamp handling 2026-09-24 09:40:29 -07:00
wiznet
xilinx net: xilinx: axienet: Treat xlnx,rxmem as a required property 2026-08-10 16:33:47 -07:00
xircom
xscale
zte dinghai: add hardware register access and PCI capability scanning 2026-08-05 18:19:49 -07:00
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig dinghai: add ZTE network driver support 2026-08-05 18:19:48 -07:00
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile dinghai: add ZTE network driver support 2026-08-05 18:19:48 -07:00
oa_tc6.c net: ethernet: oa_tc6: Fix for the wrong data type 2026-08-31 16:03:21 -07:00