Skip to content

Commit

Permalink
net: bridge: mst: fix suspicious rcu usage in br_mst_set_state
Browse files Browse the repository at this point in the history
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: 3a7c166 ("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>
  • Loading branch information
NikAleksandrov authored and kuba-moo committed Jun 13, 2024
1 parent 36c9293 commit 546ceb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_mst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 546ceb1

Please sign in to comment.