From: Omar Ramadan <omar@blockcast.net>
To: netdev-bot+sinfo@kernel.org
Cc: Taehee Yoo <ap420073@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net 0/4] amt: fix relay tunnel keying and unauthenticated-Request DoS
Date: Fri, 9 Oct 2026 20:14:50 +0000 [thread overview]
Message-ID: <20261009201451.1903979-1-omar@blockcast.net> (raw)
In-Reply-To: <179141995124.2527009.16759719486523759711@kernel.org>
Thanks -- both are fair asks. Answers below; they are also reflected in
the v2 cover letter. v1 was generated against v7.1 and did not apply to
net, so this is answered against v2, which is posted against net with the
General Query patch dropped (that fix is already in net as afae89de73dd).
v2 is three patches.
How it was found
Manual code inspection of the AMT relay path in drivers/net/amt.c, read
against RFC 7450, with LLM assistance -- hence the Assisted-by: LLM
trailer on patch 3/3. It was not a syzbot report or a static-analysis
tool scan. Patch 1/3 (endpoint keying) came out of the same reading of
amt_request_handler() and amt_update_handler() against RFC 7450 s4.2.2.
Whether it was triggered
Found by inspection; not observed in production. These are availability
and correctness defects, not memory-safety bugs, so there is no oops or
stack trace to attach. The symptoms follow deterministically from the
code the diffs change:
- 3/3, exhaustion: amt_request_handler() allocated a tunnel before any
validation of the source, so Relay Membership Requests from distinct
spoofable source endpoints fill the table to max_tunnels (default
128). Once full, further Requests are answered with ICMP_DEST_UNREACH
to the (spoofed) source and genuine gateways are refused; re-sending
once per amt_gmi() interval holds it full.
- 3/3, desync: the pre-validation lookup jumped to the send path and
overwrote an established tunnel's ->nonce/->mac, so a single spoofed
Request carrying a known gateway's source endpoint made that
gateway's next Membership Update fail the "Invalid MAC" check -- a
silent one-packet denial that consumes no table slot.
- 1/3, aliasing: address-only keying collapses two endpoints that share
a source address (NAT, or one host using separate IPv4/IPv6 ports per
RFC 7450 s4.2.2) onto one tunnel; the later Request wins and the
earlier gateway silently stops receiving.
I have not staged a live end-to-end exploit run -- the above is read
from the code paths, not a captured trace.
Fix testing (this part is observed, not inferred)
The three patches were applied to net and the kernel booted (arm64,
QEMU via virtme-ng) with CONFIG_KASAN=y, CONFIG_PROVE_LOCKING=y,
CONFIG_PROVE_RCU=y and CONFIG_DEBUG_LIST=y on top of
tools/testing/selftests/net/config. tools/testing/selftests/net/amt.sh
passes all six tests -- amt discovery, IPv4 and IPv6 multicast
forwarding, and both IPv4/IPv6 traffic-forwarding torture cases all
report [ OK ] -- with no KASAN, lockdep or RCU reports.
next prev parent reply other threads:[~2026-10-09 20:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 0:36 Omar Ramadan
2026-10-08 0:36 ` [PATCH net 1/4] amt: key relay tunnel state on the (address, port) endpoint, not the address Omar Ramadan
2026-10-08 0:36 ` [PATCH net 2/4] amt: send the relay General Query directly instead of via dev_queue_xmit Omar Ramadan
2026-10-08 0:36 ` [PATCH net 3/4] amt: make pre-query report drops visible Omar Ramadan
2026-10-08 0:36 ` [PATCH net 4/4] amt: do not create tunnel state for unauthenticated Requests Omar Ramadan
2026-10-08 0:39 ` [PATCH net 0/4] amt: fix relay tunnel keying and unauthenticated-Request DoS netdev-bot+sinfo
2026-10-09 20:14 ` Omar Ramadan [this message]
2026-10-09 17:05 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009201451.1903979-1-omar@blockcast.net \
--to=omar@blockcast.net \
--cc=andrew+netdev@lunn.ch \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sinfo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®