Re: [PATCH net 1/3] bpf: bpf_out_neigh_v4: Fix nd_tbl NULL dereference when IPv6 is disabled
From: Daniel Borkmann
Date: Wed Mar 04 2026 - 20:34:54 EST
On 3/4/26 5:13 PM, Fernando Fernandez Mancera wrote:
On 3/4/26 4:49 PM, David Ahern wrote:I presume you mean disable_ipv6_mod which then bails out during the module
On 3/3/26 9:49 PM, Daniel Borkmann wrote:
Maybe the "fix" could be to just switch IPV6 from tristate to bool in
the Kconfig, and then once net merges into net-next we could deconstruct
all the helper cruft which makes the late on-demand module loading of
IPv6 work.
+1
Maybe I am missing something here, but I believe this won't solve the problem. Even if ipv6 is built-in, it should be possible to pass ipv6.disable=1 during boot and therefore nd_tbl would still be uninitialized, not NULL tho.
load process without error, right? It could be deprecated with a warning so
that it turns into a no-op:
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 31ba677d0442..fdb8648647fd 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -1082,8 +1082,8 @@ static int __init inet6_init(void)
raw_hashinfo_init(&raw_v6_hashinfo);
if (disable_ipv6_mod) {
- pr_info("Loaded, but administratively disabled, reboot required to enable\n");
- goto out;
+ pr_warn("The ipv6.disable module parameter has been deprecated and will be removed in future kernels.\n");
+ disable_ipv6_mod = 0;
}
err = proto_register(&tcpv6_prot, 1);