mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
net: bridge: mst: fix suspicious rcu usage in br_mst_set_state
I converted br_mst_set_state to RCU to avoid a vlan use-after-free
but forgot to change the vlan group dereference helper. Switch to vlan
group RCU deref helper to fix the suspicious rcu usage warning.
Fixes: 3a7c1661ae
("net: bridge: mst: fix vlan use-after-free")
Reported-by: syzbot+9bbe2de1bc9d470eb5fe@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=9bbe2de1bc9d470eb5fe
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20240609103654.914987-3-razor@blackwall.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
36c92936e8
commit
546ceb1dfd
@ -102,7 +102,7 @@ int br_mst_set_state(struct net_bridge_port *p, u16 msti, u8 state,
|
||||
int err = 0;
|
||||
|
||||
rcu_read_lock();
|
||||
vg = nbp_vlan_group(p);
|
||||
vg = nbp_vlan_group_rcu(p);
|
||||
if (!vg)
|
||||
goto out;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user