From: Kuniyuki Iwashima <kuniyu@google.com>
To: devnull+maximilianpezzullo.gmail.com@kernel.org
Cc: bridge@lists.linux.dev, davem@davemloft.net, edumazet@google.com,
gurucp2005@bugzilla.kernel.org, horms@kernel.org,
idosch@nvidia.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, maximilianpezzullo@gmail.com,
netdev@vger.kernel.org, pabeni@redhat.com, razor@blackwall.org
Subject: Re: [PATCH] net: bridge: fix NULL dereference in br_do_suppress_nd when ipv6.disable=1
Date: Wed, 4 Mar 2026 08:42:57 +0000 [thread overview]
Message-ID: <20260304084348.1075022-1-kuniyu@google.com> (raw)
In-Reply-To: <20260304-br-nd-suppress-ipv6-null-fix-v1-1-084356ba8257@gmail.com>
From: Maximilian Pezzullo via B4 Relay <devnull+maximilianpezzullo.gmail.com@kernel.org>
Date: Wed, 04 Mar 2026 09:20:23 +0100
> From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
>
> When the kernel is booted with ipv6.disable=1, the IPv6 module loads
> but skips full initialization, leaving ipv6_stub as NULL. If the bridge
> neigh_suppress feature is enabled on a port and an ICMPv6 Neighbor
> Solicitation arrives, br_do_suppress_nd() calls neigh_lookup() via
> ipv6_stub->nd_tbl without first checking whether ipv6_stub is valid,
> causing a kernel panic.
>
> Fix this by returning early if ipv6_stub or its nd_tbl pointer is NULL.
>
> Reported-by: Guruprasad C P <gurucp2005@bugzilla.kernel.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221143
> Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
> ---
> net/bridge/br_arp_nd_proxy.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/bridge/br_arp_nd_proxy.c b/net/bridge/br_arp_nd_proxy.c
> index 1e2b51769eec..0b1b9ba29b7d 100644
> --- a/net/bridge/br_arp_nd_proxy.c
> +++ b/net/bridge/br_arp_nd_proxy.c
> @@ -455,6 +455,9 @@ void br_do_suppress_nd(struct sk_buff *skb, struct net_bridge *br,
> return;
> }
>
> + if (!ipv6_stub || !ipv6_stub->nd_tbl)
> + return;
ipv6_stub is never be NULL.
Also, Fernando is already working on the fix.
https://lore.kernel.org/netdev/20260226234059.19402-1-fmancera@suse.de/
https://lore.kernel.org/netdev/20260302140847.5941-1-fmancera@suse.de/
> +
> n = neigh_lookup(ipv6_stub->nd_tbl, &msg->target, vlandev);
> if (n) {
> struct net_bridge_fdb_entry *f;
>
> ---
> base-commit: af4e9ef3d78420feb8fe58cd9a1ab80c501b3c08
> change-id: 20260304-br-nd-suppress-ipv6-null-fix-0a516fc27f1a
>
> Best regards,
> --
> Maximilian Pezzullo <maximilianpezzullo@gmail.com>
prev parent reply other threads:[~2026-03-04 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 8:20 [PATCH] net: bridge: fix NULL dereference in br_do_suppress_nd when ipv6.disable=1 Maximilian Pezzullo via B4 Relay
2026-03-04 8:42 ` Kuniyuki Iwashima [this message]
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=20260304084348.1075022-1-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=bridge@lists.linux.dev \
--cc=davem@davemloft.net \
--cc=devnull+maximilianpezzullo.gmail.com@kernel.org \
--cc=edumazet@google.com \
--cc=gurucp2005@bugzilla.kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximilianpezzullo@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
/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