mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net v4 0/2] amt: send the relay's General Query directly from the receive path
@ 2026-09-28 20:23 Omar Ramadan
  2026-09-28 20:23 ` [PATCH net v4 1/2] " Omar Ramadan
  2026-09-28 20:23 ` [PATCH net v4 2/2] selftests: net: amt: check that the relay's queries bypass the amt device Omar Ramadan
  0 siblings, 2 replies; 3+ messages in thread
From: Omar Ramadan @ 2026-09-28 20:23 UTC (permalink / raw)
  To: Taehee Yoo, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Shuah Khan, netdev, linux-kselftest, linux-kernel,
	AutonomousCodeSecurity, Xiang Mei, tgopinath, kys, Cen Zhang

The relay queues its General Query on the amt device with a raw tunnel
pointer in skb->cb, and a query that waits in a qdisc can outlive its
tunnel: a use-after-free in amt_dev_xmit(), reported by Microsoft with
a KASAN reproducer. Patch 1 sends the query directly from
amt_request_handler(), inside the RCU section that found or created
the tunnel, so it never waits in a qdisc and nothing is stored in
skb->cb.

Patch 2 adds the selftest Taehee asked for. It counts the queries that
leave the relay through its amt device and expects none. It fails
without patch 1 and passes with it.

v4: patch 1 is unchanged from v3; patch 2 is new.
v3: https://lore.kernel.org/netdev/20260928181601.85857-1-omar@blockcast.net/
v2: https://lore.kernel.org/netdev/20260922214150.13970-1-cenzhang@linux.microsoft.com/

Omar Ramadan (2):
  amt: send the relay's General Query directly from the receive path
  selftests: net: amt: check that the relay's queries bypass the amt
    device

 drivers/net/amt.c                  | 48 ++++++++++--------------------
 include/net/amt.h                  |  4 ---
 tools/testing/selftests/net/amt.sh | 29 ++++++++++++++++++
 3 files changed, 44 insertions(+), 37 deletions(-)


base-commit: a7bfaba4823e3c165bb2004c74eff7c096672bc7
-- 
2.47.3


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

end of thread, other threads:[~2026-09-28 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 20:23 [PATCH net v4 0/2] amt: send the relay's General Query directly from the receive path Omar Ramadan
2026-09-28 20:23 ` [PATCH net v4 1/2] " Omar Ramadan
2026-09-28 20:23 ` [PATCH net v4 2/2] selftests: net: amt: check that the relay's queries bypass the amt device Omar Ramadan

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

all inboxes | Powered by JetHome®