From: sashiko-bot@kernel.org
To: "Omar Ramadan" <omar@blockcast.net>
Cc: linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v6 3/6] amt: reject a gateway Query or Data from 0.0.0.0 before a relay is learned
Date: Sun, 08 Nov 2026 00:50:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-203503@kernel.org> (raw)
In-Reply-To: <20261107004935.2627329-4-omar@blockcast.net>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] amt: wrong Fixes trailer commit in amt_rcv() remote_ip check fix
--
commit 96318be241052a6271835580e7680bbadcc12e44
Author: Omar Ramadan <omar@blockcast.net>
> amt: reject a gateway Query or Data from 0.0.0.0 before a relay is learned
>
> A gateway's amt_rcv() admits a Membership Query or Multicast Data
> message when "saddr != remote_ip" is false. remote_ip is 0 before
> discovery has learned a relay (and is reset to 0 by amt_dev_open(), by
> amt_dev_stop(), and when the gateway gives up after its Requests go
> unanswered), so a packet whose source is 0.0.0.0 would otherwise pass
> the equality check and could spoof a Query or inject multicast data.
> IPv4 input accepts a 0.0.0.0 source only on a limited broadcast, so the
> sender has to be on the gateway's link.
>
> Reject both when no relay is learned: a 0 remote_ip must match nothing, so
> guard the check with !remote_ip. A Query is queued before its event worker
> processes it, so the relay address can also change in that window. Recheck
> the packet source against the current remote_ip in the handler and discard
> stale Queries. Discovery is unaffected because Relay Advertisements are
> validated against discovery_ip, not remote_ip.
>
> Found by code inspection while writing the IPv6 receive path for the
> AMT IPv6 outer transport; not triggered at runtime.
>
> Fixes: b9022b53adad ("amt: add control plane of amt interface")
> Assisted-by: LLM
> Signed-off-by: Omar Ramadan <omar@blockcast.net>
[Severity: Low]
Commit b9022b53adad ("amt: add control plane of amt interface") only added
the control plane setup; amt_rcv() and amt_membership_query_handler() were
introduced in cbc21dc1cfe9 ("amt: add data plane of amt interface"), and
deferred query handling was added in 30e22a6ebca0 ("amt: use workqueue for
gateway side message handling"). Should the Fixes: tag reference those
commits instead?
Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface")
Fixes: 30e22a6ebca0 ("amt: use workqueue for gateway side message handling")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261107004935.2627329-1-omar@blockcast.net?part=3
next prev parent reply other threads:[~2026-11-08 0:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 0:49 [PATCH net v6 0/6] amt: relay tunnel lifetime, validation and request-path hardening Omar Ramadan
2026-11-07 0:49 ` [PATCH net v6 1/6] amt: stop receiving before amt_dev_stop() tears down its state Omar Ramadan
2026-11-07 0:49 ` [PATCH net v6 2/6] amt: fix use-after-free when a Membership Update re-arms a freed tunnel Omar Ramadan
2026-11-07 0:49 ` [PATCH net v6 3/6] amt: reject a gateway Query or Data from 0.0.0.0 before a relay is learned Omar Ramadan
2026-11-08 0:50 ` sashiko-bot [this message]
2026-11-07 0:49 ` [PATCH net v6 4/6] amt: require an exact IPv4-sized IFLA_AMT_{LOCAL,DISCOVERY}_IP Omar Ramadan
2026-11-07 0:49 ` [PATCH net v6 5/6] amt: make pre-query report drops visible Omar Ramadan
2026-11-07 0:49 ` [PATCH net v6 6/6] amt: create relay tunnels only from authenticated Updates Omar Ramadan
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=sashiko-outbox-203503@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=omar@blockcast.net \
--cc=sashiko-reviews@lists.linux.dev \
/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®