Linux: net: bridge: mst: move switchdev call outside rcu
What fixes it
- 6b431b63219853eef4054e2f1cb073d2ca2059b4LinuxCVE List
- 18a6fe05fb6e18de29fa90d388bb34044114b3d8LinuxCVE List
- 6.1.189LinuxCVE List
- 6.6.158LinuxCVE List
- 6.9LinuxCVE List
- 6.10LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
net: bridge: mst: move switchdev call outside rcu
This is a follow-up of one of sashiko's pre-existing bug reports. br_mst_set_state() calls switchdev_port_attr_set() for nonzero MSTIs while holding rcu_read_lock() which invokes the blocking switchdev notifier chain and may sleep. Nonzero MSTI changes come from netlink with rtnl held. Move the switchdev call before entering the rcu section and assert that rtnl is held.
The call cannot be deferred because netlink needs its error and extack. Also DSA reads the old bridge MST state during the callback and checks it. A deferred callback will be late and will see the updated state.
Text from CVE List
Affected versions 20
- Linuxaffected: 8ca9a750fc711911ef616ceb627d07357b04545e before b9661fd2423fc25e91e0517ecc0b6156ad83e3a8CVE List
- Linuxaffected: 4488617e5e995a09abe4d81add5fb165674edb59 before 6b431b63219853eef4054e2f1cb073d2ca2059b4CVE List
- Linuxaffected: 3a7c1661ae1383364cd6092d851f5e5da64d476b before abf734d150c61acfdfee102169d0e5d1c482e285CVE List
- Linuxaffected: 3a7c1661ae1383364cd6092d851f5e5da64d476b before d5c4ee1fa4e83a12afc051c831936cd8e006cde3CVE List
- Linuxaffected: 3a7c1661ae1383364cd6092d851f5e5da64d476b before c40ed3e884c8dc0350f26484030438ef24208ff1CVE List
- Linuxaffected: 3a7c1661ae1383364cd6092d851f5e5da64d476b before 18a6fe05fb6e18de29fa90d388bb34044114b3d8CVE List
- Linuxaffected: a2b01e65d9ba8af2bb086d3b7288ca53a07249acCVE List
- Linuxaffected: e43dd2b1ec746e105b7db5f9ad6ef14685a615a4CVE List
- Linuxaffected: 6.1.93 before 6.1.189CVE List
- Linuxaffected: 6.6.33 before 6.6.158CVE List
- Linuxaffected: 6.8.12 before 6.9CVE List
- Linuxaffected: 6.9.3 before 6.10CVE List
- Linuxaffected: 6.10CVE List
- Linuxunaffected: all versions before 6.10CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.54 through 6.18.*CVE List
- Linuxunaffected: 7.2.8 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 6
- git.kernel.org/stable/c/b9661fd2423fc25e91e0517ecc0b6156ad83e3a8Referencevia CVE List
- git.kernel.org/stable/c/6b431b63219853eef4054e2f1cb073d2ca2059b4Referencevia CVE List
- git.kernel.org/stable/c/abf734d150c61acfdfee102169d0e5d1c482e285Referencevia CVE List
- git.kernel.org/stable/c/d5c4ee1fa4e83a12afc051c831936cd8e006cde3Referencevia CVE List
- git.kernel.org/stable/c/c40ed3e884c8dc0350f26484030438ef24208ff1Referencevia CVE List
- git.kernel.org/stable/c/18a6fe05fb6e18de29fa90d388bb34044114b3d8Referencevia CVE List