mirror of https://github.com/torvalds/linux.git
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. Then, if neigh_suppress is enabled and an ICMPv6
Neighbor Discovery packet reaches the bridge, br_do_suppress_nd() will
dereference ipv6_stub->nd_tbl which is NULL, passing it to
neigh_lookup(). This causes a kernel NULL pointer dereference.
BUG: kernel NULL pointer dereference, address: 0000000000000268
Oops: 0000 [#1] PREEMPT SMP NOPTI
[...]
RIP: 0010:neigh_lookup+0x16/0xe0
[...]
Call Trace:
<IRQ>
? neigh_lookup+0x16/0xe0
br_do_suppress_nd+0x160/0x290 [bridge]
br_handle_frame_finish+0x500/0x620 [bridge]
br_handle_frame+0x353/0x440 [bridge]
__netif_receive_skb_core.constprop.0+0x298/0x1110
__netif_receive_skb_one_core+0x3d/0xa0
process_backlog+0xa0/0x140
__napi_poll+0x2c/0x170
net_rx_action+0x2c4/0x3a0
handle_softirqs+0xd0/0x270
do_softirq+0x3f/0x60
Fix this by replacing IS_ENABLED(IPV6) call with ipv6_mod_enabled() in
the callers. This is in essence disabling NS/NA suppression when IPv6 is
disabled.
Fixes:
|
||
|---|---|---|
| .. | ||
| netfilter | ||
| Kconfig | ||
| Makefile | ||
| br.c | ||
| br_arp_nd_proxy.c | ||
| br_cfm.c | ||
| br_cfm_netlink.c | ||
| br_device.c | ||
| br_fdb.c | ||
| br_forward.c | ||
| br_if.c | ||
| br_input.c | ||
| br_ioctl.c | ||
| br_mdb.c | ||
| br_mrp.c | ||
| br_mrp_netlink.c | ||
| br_mrp_switchdev.c | ||
| br_mst.c | ||
| br_multicast.c | ||
| br_multicast_eht.c | ||
| br_netfilter_hooks.c | ||
| br_netfilter_ipv6.c | ||
| br_netlink.c | ||
| br_netlink_tunnel.c | ||
| br_nf_core.c | ||
| br_private.h | ||
| br_private_cfm.h | ||
| br_private_mcast_eht.h | ||
| br_private_mrp.h | ||
| br_private_stp.h | ||
| br_private_tunnel.h | ||
| br_stp.c | ||
| br_stp_bpdu.c | ||
| br_stp_if.c | ||
| br_stp_timer.c | ||
| br_switchdev.c | ||
| br_sysfs_br.c | ||
| br_sysfs_if.c | ||
| br_vlan.c | ||
| br_vlan_options.c | ||
| br_vlan_tunnel.c | ||