android_kernel_oneplus_msm8998/net/bridge
Florian Westphal 56f9b9502f bridge: drop netfilter fake rtable unconditionally
[ Upstream commit a13b2082ece95247779b9995c4e91b4246bed023 ]

Andreas reports kernel oops during rmmod of the br_netfilter module.
Hannes debugged the oops down to a NULL rt6info->rt6i_indev.

Problem is that br_netfilter has the nasty concept of adding a fake
rtable to skb->dst; this happens in a br_netfilter prerouting hook.

A second hook (in bridge LOCAL_IN) is supposed to remove these again
before the skb is handed up the stack.

However, on module unload hooks get unregistered which means an
skb could traverse the prerouting hook that attaches the fake_rtable,
while the 'fake rtable remove' hook gets removed from the hooklist
immediately after.

Fixes: 34666d467c ("netfilter: bridge: move br_netfilter out of the core")
Reported-by: Andreas Karis <akaris@redhat.com>
Debugged-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-22 12:04:17 +01:00
..
netfilter netfilter: remove hook owner refcounting 2015-10-16 18:21:39 +02:00
br.c switchdev: Require RTNL mutex to be held when sending FDB notifications 2016-03-03 15:07:04 -08:00
br_device.c bridge: fix lockdep addr_list_lock false positive splat 2016-01-31 11:29:01 -08:00
br_fdb.c bridge: Don't insert unnecessary local fdb entry on changing mac address 2016-06-24 10:18:17 -07:00
br_forward.c bridge: set is_local and is_static before fdb entry is added to the fdb hashtable 2015-10-30 12:13:05 +09:00
br_if.c bridge: defer switchdev fdb del call in fdb_del_external_learn 2015-10-15 06:09:50 -07:00
br_input.c bridge: drop netfilter fake rtable unconditionally 2017-03-22 12:04:17 +01:00
br_ioctl.c net: bridge: fix old ioctl unlocked net device walk 2016-05-18 17:06:42 -07:00
br_mdb.c
br_multicast.c bridge: multicast: restore perm router ports on multicast enable 2016-11-15 07:46:38 +01:00
br_netfilter_hooks.c bridge: drop netfilter fake rtable unconditionally 2017-03-22 12:04:17 +01:00
br_netfilter_ipv6.c
br_netlink.c bridge: netlink: call br_changelink() during br_dev_newlink() 2017-02-04 09:45:09 +01:00
br_nf_core.c
br_private.h Bridge: Fix ipv6 mc snooping if bridge has no ipv6 address 2016-07-11 09:31:11 -07:00
br_private_stp.h
br_stp.c bridge: Allow set bridge ageing time when switchdev disabled 2016-04-20 15:42:05 +09:00
br_stp_bpdu.c
br_stp_if.c bridge: Only call /sbin/bridge-stp for the initial network namespace 2016-01-05 16:46:17 -05:00
br_stp_timer.c
br_sysfs_br.c bridge: fix gc_timer mod/del race condition 2015-10-13 04:50:17 -07:00
br_sysfs_if.c
br_vlan.c bridge: vlan: Use rcu_dereference instead of rtnl_dereference 2015-11-02 16:27:39 -05:00
Kconfig
Makefile