summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-03 10:53:42 (GMT)
committerDavid S. Miller <davem@davemloft.net>2008-07-03 10:53:42 (GMT)
commitab1b20467cd2214ad89a95d007047cd2a6b5bf5d (patch)
treed6cb28dab25eada6f2963d23afd284d0b899bab5 /ipc
parent374e7b59498ce0785b3727794b351221528a5159 (diff)
downloadlinux-ab1b20467cd2214ad89a95d007047cd2a6b5bf5d.tar.xz
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions