From: Ido Schimmel <idosch@nvidia.com>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: Sabrina Dubroca <sd@queasysnail.net>,
netdev@vger.kernel.org, bridge@lists.linux.dev,
roopa@cumulusnetworks.com, sdf@fomichev.me, petrm@nvidia.com,
horms@kernel.org, razor@blackwall.org, pabeni@redhat.com,
kuba@kernel.org, edumazet@google.com, davem@davemloft.net,
andrew+netdev@lunn.ch
Subject: Re: [PATCH 2/2 net v2] net: vxlan: fix nd_tbl NULL dereference when IPv6 is disabled
Date: Mon, 2 Mar 2026 18:36:43 +0200 [thread overview]
Message-ID: <20260302163643.GA971179@shredder> (raw)
In-Reply-To: <c2e08123-9338-4836-82e7-f47eb344f41f@suse.de>
On Mon, Mar 02, 2026 at 04:13:14PM +0100, Fernando Fernandez Mancera wrote:
> On 3/2/26 3:43 PM, Sabrina Dubroca wrote:
> > 2026-03-02, 15:08:47 +0100, Fernando Fernandez Mancera wrote:
> > > When booting with the 'ipv6.disable=1' parameter, the nd_tbl is never
> > > initialized because inet6_init() exits before ndisc_init() is called
> > > which initializes it. If an IPv6 packet is injected into the interface,
> > > route_shortcircuit() is called and a NULL pointer dereference happens on
> > > neigh_lookup().
> >
> > VXLAN can be built-in even when IPv6 is built as a module, and then
> > ipv6_mod_enabled can't be used in VXLAN:
> >
> > ld: drivers/net/vxlan/vxlan_core.o: in function `route_shortcircuit':
> > drivers/net/vxlan/vxlan_core.c:2133:(.text+0x116e0): undefined reference to `ipv6_mod_enabled'
> >
> >
> > GENEVE has a Kconfig tweak to prevent this since 094be0927ff3
> > ("geneve: fix build with modular IPV6"):
> >
> > depends on IPV6 || !IPV6
> >
> > but VXLAN doesn't.
> >
>
> Ugh, good catch. Thanks Sabrina.
>
> > But then I think we don't need to use ipv6_stub at all.
>
> If we enforce "depends on IPV6 || IPV6=n" on VXLAN we could get rid of
> ipv6_stub completely and use direct calls instead.
I just noticed that this is already enforced for the bridge, so maybe
you can just remove ipv6_stub in patch #1?
next prev parent reply other threads:[~2026-03-02 16:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 14:08 [PATCH 1/2 net v2] net: bridge: fix nd_tbl NULL dereference when IPv6 is disabled Fernando Fernandez Mancera
2026-03-02 14:08 ` [PATCH 2/2 net v2] net: vxlan: " Fernando Fernandez Mancera
2026-03-02 14:43 ` Sabrina Dubroca
2026-03-02 15:13 ` Fernando Fernandez Mancera
2026-03-02 16:36 ` Ido Schimmel [this message]
2026-03-02 17:44 ` Fernando Fernandez Mancera
2026-03-02 18:04 ` Fernando Fernandez Mancera
2026-03-02 23:02 ` Sabrina Dubroca
2026-03-03 11:15 ` Fernando Fernandez Mancera
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=20260302163643.GA971179@shredder \
--to=idosch@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=bridge@lists.linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fmancera@suse.de \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.org \
--cc=roopa@cumulusnetworks.com \
--cc=sd@queasysnail.net \
--cc=sdf@fomichev.me \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.