[PATCH net v4 0/4] {net,bpf}: nd_tbl fixes for when ipv6.disable=1

Ricardo B. Marlière posted 4 patches 1 month ago
drivers/net/bonding/bond_main.c | 2 +-
include/linux/ipv6.h            | 7 ++++++-
net/core/filter.c               | 7 +++++++
net/ipv4/af_inet.c              | 6 ++++++
net/ipv6/af_inet6.c             | 8 --------
5 files changed, 20 insertions(+), 10 deletions(-)
[PATCH net v4 0/4] {net,bpf}: nd_tbl fixes for when ipv6.disable=1
Posted by Ricardo B. Marlière 1 month ago
Hi,

Please consider merging these four patches to fix three crashes that were
found after this report:

https://lore.kernel.org/all/CAHXs0ORzd62QOG-Fttqa2Cx_A_VFp=utE2H2VTX5nqfgs7LDxQ@mail.gmail.com

The first patch from Jakub Kicinski is a preparation in order to enable
the use ipv6_mod_enabled() even when CONFIG_IPV6=n.

Thank you,
-	Ricardo.

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
Changes in v4:
- Use preparatory patch from Jakub (thx!)
- Use ipv6_mod_enabled() helper in all three patches
- bonding: Move check to an earlier point - bond_rcv_validate() instead of bond_na_rcv()
- Link to v3: https://lore.kernel.org/r/20260305-net-nd_tbl_fixes-v3-0-fde28b30a744@suse.com

Changes in v3:
- Don't use ipv6_mod_enabled() in net/core/filter.c.
- Link to v2: https://lore.kernel.org/r/20260305-net-nd_tbl_fixes-v2-0-b7177db1a9f3@suse.com

Changes in v2:
- Used ipv6_mod_enabled() helper, guarded by unlikely().
- Link to v1: https://lore.kernel.org/r/20260228-net-nd_tbl_fixes-v1-0-2b2a274df9bb@suse.com

---
Jakub Kicinski (1):
      ipv6: move the disable_ipv6_mod knob to core code

Ricardo B. Marlière (3):
      net: bonding: Fix nd_tbl NULL dereference when IPv6 is disabled
      bpf: bpf_out_neigh_v4: Fix nd_tbl NULL dereference when IPv6 is disabled
      bpf: bpf_out_neigh_v6: Fix nd_tbl NULL dereference when IPv6 is disabled

 drivers/net/bonding/bond_main.c | 2 +-
 include/linux/ipv6.h            | 7 ++++++-
 net/core/filter.c               | 7 +++++++
 net/ipv4/af_inet.c              | 6 ++++++
 net/ipv6/af_inet6.c             | 8 --------
 5 files changed, 20 insertions(+), 10 deletions(-)
---
base-commit: b824c3e16c1904bf80df489e293d1e3cbf98896d
change-id: 20260228-net-nd_tbl_fixes-ce81ca1e0bf2

Best regards,
-- 
Ricardo B. Marlière <rbm@suse.com>

Re: [PATCH net v4 0/4] {net,bpf}: nd_tbl fixes for when ipv6.disable=1
Posted by Jakub Kicinski 4 weeks, 1 day ago
On Sat, 07 Mar 2026 17:50:52 -0300 Ricardo B. Marlière wrote:
>       bpf: bpf_out_neigh_v4: Fix nd_tbl NULL dereference when IPv6 is disabled
>       bpf: bpf_out_neigh_v6: Fix nd_tbl NULL dereference when IPv6 is disabled

Hi Daniel, are you okay with these for net?
Re: [PATCH net v4 0/4] {net,bpf}: nd_tbl fixes for when ipv6.disable=1
Posted by Daniel Borkmann 4 weeks, 1 day ago
On 3/11/26 1:58 AM, Jakub Kicinski wrote:
> On Sat, 07 Mar 2026 17:50:52 -0300 Ricardo B. Marlière wrote:
>>        bpf: bpf_out_neigh_v4: Fix nd_tbl NULL dereference when IPv6 is disabled
>>        bpf: bpf_out_neigh_v6: Fix nd_tbl NULL dereference when IPv6 is disabled
> 
> Hi Daniel, are you okay with these for net?
Yes, these look good to me. Go for it via net!

Thanks,
Daniel
Re: [PATCH net v4 0/4] {net,bpf}: nd_tbl fixes for when ipv6.disable=1
Posted by Jakub Kicinski 4 weeks ago
On Wed, 11 Mar 2026 06:50:18 +0100 Daniel Borkmann wrote:
> On 3/11/26 1:58 AM, Jakub Kicinski wrote:
> > On Sat, 07 Mar 2026 17:50:52 -0300 Ricardo B. Marlière wrote:  
> >>        bpf: bpf_out_neigh_v4: Fix nd_tbl NULL dereference when IPv6 is disabled
> >>        bpf: bpf_out_neigh_v6: Fix nd_tbl NULL dereference when IPv6 is disabled  
> > 
> > Hi Daniel, are you okay with these for net?  
> Yes, these look good to me. Go for it via net!

Thanks!