linux/net/bridge
Nikolay Aleksandrov e3c0852fdd bridge: fix br_stp_set_bridge_priority race conditions
[ Upstream commit 2dab80a8b4 ]

After the ->set() spinlocks were removed br_stp_set_bridge_priority
was left running without any protection when used via sysfs. It can
race with port add/del and could result in use-after-free cases and
corrupted lists. Tested by running port add/del in a loop with stp
enabled while setting priority in a loop, crashes are easily
reproducible.
The spinlocks around sysfs ->set() were removed in commit:
14f98f258f ("bridge: range check STP parameters")
There's also a race condition in the netlink priority support that is
fixed by this change, but it was introduced recently and the fixes tag
covers it, just in case it's needed the commit is:
af615762e9 ("bridge: add ageing_time, stp_state, priority over netlink")

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Fixes: 14f98f258f ("bridge: range check STP parameters")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-07-05 10:12:58 -04:00
..
netfilter netfilter: nft_reject_bridge: Fix powerpc build error 2014-11-03 12:12:34 -05:00
br.c netfilter: bridge: move br_netfilter out of the core 2014-09-26 18:42:31 +02:00
br_device.c bridge: Add filtering support for default_pvid 2014-10-05 21:21:37 -04:00
br_fdb.c bridge: disable softirqs around br_fdb_update to avoid lockup 2015-06-15 14:26:54 -04:00
br_forward.c netfilter: nft_reject_bridge: don't use IP stack to reject traffic 2014-10-31 12:50:08 +01:00
br_if.c bridge: Add filtering support for default_pvid 2014-10-05 21:21:37 -04:00
br_input.c netfilter: bridge: move br_netfilter out of the core 2014-09-26 18:42:31 +02:00
br_ioctl.c bridge: fix br_stp_set_bridge_priority race conditions 2015-07-05 10:12:58 -04:00
br_mdb.c bridge: rename struct bridge_mcast_query/querier 2014-06-10 23:50:46 -07:00
br_multicast.c bridge: fix multicast router rlist endless loop 2015-07-05 10:12:57 -04:00
br_netfilter.c netfilter: bridge: really save frag_max_size between PRE and POST_ROUTING 2015-05-17 19:12:30 -04:00
br_netlink.c bridge: Add missing policy entry for IFLA_BRPORT_FAST_LEAVE 2014-11-26 15:29:01 -05:00
br_nf_core.c netfilter: bridge: move br_netfilter out of the core 2014-09-26 18:42:31 +02:00
br_private.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-10-08 16:22:22 -04:00
br_private_stp.h net: 8021q/bluetooth/bridge/can/ceph: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
br_stp.c net: bridge: add a br_set_state helper function 2014-10-01 22:03:50 -04:00
br_stp_bpdu.c br: fix use of ->rx_handler_data in code executed on non-rx_handler path 2013-12-06 15:41:40 -05:00
br_stp_if.c bridge: fix br_stp_set_bridge_priority race conditions 2015-07-05 10:12:58 -04:00
br_stp_timer.c net: bridge: add a br_set_state helper function 2014-10-01 22:03:50 -04:00
br_sysfs_br.c bridge: Add a default_pvid sysfs attribute 2014-10-05 21:21:36 -04:00
br_sysfs_if.c bridge: Keep track of ports capable of automatic discovery. 2014-05-16 17:06:33 -04:00
br_vlan.c vlan: rename __vlan_put_tag to vlan_insert_tag_set_proto 2015-04-27 16:48:33 -04:00
Kconfig bridge: Add vlan filtering infrastructure 2013-02-13 19:41:46 -05:00
Makefile netfilter: bridge: build br_nf_core only if required 2014-09-30 14:07:51 -04:00