Subject: CVE-2024-40920: net: bridge: mst: fix suspicious rcu usage in br_mst_set_state

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

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.

The Linux kernel CVE team has assigned CVE-2024-40920 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.1.93 with commit 8ca9a750fc71 and fixed in 6.1.95 with commit caaa2129784a
	Issue introduced in 6.6.33 with commit 4488617e5e99 and fixed in 6.6.35 with commit 7caefa277172
	Issue introduced in 6.9.3 with commit e43dd2b1ec74 and fixed in 6.9.6 with commit 406bfc04b01e
	Issue introduced in 6.8.12 with commit a2b01e65d9ba

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2024-40920
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	net/bridge/br_mst.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/caaa2129784a04dcade0ea92c12e6ff90bbd23d8
	https://git.kernel.org/stable/c/7caefa2771722e65496d85b62e1dc4442b7d1345
	https://git.kernel.org/stable/c/406bfc04b01ee47e4c626f77ecc7d9f85135b166
	https://git.kernel.org/stable/c/546ceb1dfdac866648ec959cbc71d9525bd73462