android_kernel_xiaomi_sm8350/net/bridge
Patrick McHardy ab1b20467c bridge: fix use-after-free in br_cleanup_bridges()
Unregistering a bridge device may cause virtual devices stacked on the
bridge, like vlan or macvlan devices, to be unregistered as well.
br_cleanup_bridges() uses for_each_netdev_safe() to iterate over all
devices during cleanup. This is not enough however, if one of the
additionally unregistered devices is next in the list to the bridge
device, it will get freed as well and the iteration continues on
the freed element.

Restart iteration after each bridge device removal from the beginning to
fix this, similar to what rtnl_link_unregister() does.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-03 03:53:42 -07:00
..
netfilter [NETFILTER]: bridge: add ebt_nflog watcher 2008-04-14 11:15:54 +02:00
br_device.c
br_fdb.c bridge: forwarding table information for >256 devices 2008-05-02 16:53:33 -07:00
br_forward.c
br_if.c bridge: fix use-after-free in br_cleanup_bridges() 2008-07-03 03:53:42 -07:00
br_input.c
br_ioctl.c
br_netfilter.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
br_netlink.c [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
br_notify.c [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
br_private_stp.h
br_private.h
br_stp_bpdu.c net: use get/put_unaligned_* helpers 2008-05-02 16:26:16 -07:00
br_stp_if.c
br_stp_timer.c
br_stp.c
br_sysfs_br.c net: replace remaining __FUNCTION__ occurrences 2008-03-05 20:47:47 -08:00
br_sysfs_if.c
br.c bridge: kernel panic when unloading bridge module 2008-04-29 03:18:13 -07:00
Kconfig
Makefile