Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/3] net: don't read an unset MAC header on the raw/qdisc-bypass TX path
@ 2026-07-13 19:40 Doruk Tan Ozturk
  2026-07-13 19:40 ` [PATCH net 1/3] net: dsa: tag_ocelot_8021q: don't read an unset MAC header on transmit Doruk Tan Ozturk
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Doruk Tan Ozturk @ 2026-07-13 19:40 UTC (permalink / raw)
  To: Vladimir Oltean, Andrew Lunn, Florian Fainelli, Woojung Huh,
	Nick Child, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: netdev, linux-kernel, linuxppc-dev, Sabrina Dubroca,
	Arun Ramadoss, UNGLinuxDriver, Michael Ellerman, Doruk Tan Ozturk

On the AF_PACKET SOCK_RAW + PACKET_QDISC_BYPASS transmit path, skb->mac_header
is left unset when ndo_start_xmit() runs, so eth_hdr(skb) resolves ~64KB out of
bounds. Commit f5089008f90c ("macsec: don't read an unset MAC header in
macsec_encrypt()") fixed one instance; these three are the same class in other
TX/.xmit paths, each reading eth_hdr(skb)->h_dest. On TX the L2 header is at
skb->data, so use skb_eth_hdr() (a no-op on normal TX where mac_header is set).

Found by static analysis (0sec); verified against source, not runtime-reproduced.
Confirmed by an independent cross-check that mac_header is unset on the bypass
path (__dev_direct_xmit does not reset it). More siblings exist (sja1105 shared
TX/RX helper, atlantic PTP path) and will follow separately.


Doruk Tan Ozturk (3):
  net: dsa: tag_ocelot_8021q: don't read an unset MAC header on transmit
  net: dsa: tag_ksz: don't read an unset MAC header in lan937x_xmit()
  ibmveth: don't read an unset MAC header on transmit

 drivers/net/ethernet/ibm/ibmveth.c | 2 +-
 net/dsa/tag_ksz.c                  | 2 +-
 net/dsa/tag_ocelot_8021q.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-13 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 19:40 [PATCH net 0/3] net: don't read an unset MAC header on the raw/qdisc-bypass TX path Doruk Tan Ozturk
2026-07-13 19:40 ` [PATCH net 1/3] net: dsa: tag_ocelot_8021q: don't read an unset MAC header on transmit Doruk Tan Ozturk
2026-07-13 20:04   ` Vladimir Oltean
2026-07-13 21:12     ` Doruk (0sec)
2026-07-13 21:37       ` Vladimir Oltean
2026-07-13 19:40 ` [PATCH net 2/3] net: dsa: tag_ksz: don't read an unset MAC header in lan937x_xmit() Doruk Tan Ozturk
2026-07-13 19:40 ` [PATCH net 3/3] ibmveth: don't read an unset MAC header on transmit Doruk Tan Ozturk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox