Linux: net: bridge: mcast: properly convert mglist to rcu
What fixes it
- 37cb9a81600da8250f24e25edc07253b62353cbeLinuxCVE List
- 98247c8264d2076f81fa114bdfa2c2271953ac7cLinuxCVE List
- 38ab2a435001a3c4dbeb70a52f5921e1ccd66f55LinuxCVE List
- 4b772869a1e5f9da5cef5b9c722ec0aa424ee0a0LinuxCVE 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: mcast: properly convert mglist to rcu
Sashiko reported a bug [1] that br_multicast_del_port_group unlists the port group not using proper rcu helper that preserves the next pointer and after that immediately frees the port group without waiting for rcu grace period. The only rcu walker of mglist is br_multicast_list_adjacent() and it turns out that function has always been buggy because mglist was never properly converted to RCU. Fix it by converting it to rcu and moving its initialization after eth_addr's. Initializing p->next can use RCU_INIT_POINTER because we have a barrier from the hlist_add_head_rcu call later, besides we're initializing an unpublished structure anyway.
[1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260826014200.362304-1-littleddfu%40gmail.com
Text from CVE List
Affected versions 12
- Linuxaffected: 07f8ac4a1e26e8283542cdaf658a6e2a12fd6980 before 37cb9a81600da8250f24e25edc07253b62353cbeCVE List
- Linuxaffected: 07f8ac4a1e26e8283542cdaf658a6e2a12fd6980 before 98247c8264d2076f81fa114bdfa2c2271953ac7cCVE List
- Linuxaffected: 07f8ac4a1e26e8283542cdaf658a6e2a12fd6980 before 38ab2a435001a3c4dbeb70a52f5921e1ccd66f55CVE List
- Linuxaffected: 07f8ac4a1e26e8283542cdaf658a6e2a12fd6980 before f7bf57e94a5d6214b87be08486cb33836fbfa573CVE List
- Linuxaffected: 07f8ac4a1e26e8283542cdaf658a6e2a12fd6980 before 4b772869a1e5f9da5cef5b9c722ec0aa424ee0a0CVE List
- Linuxaffected: 3.16CVE List
- Linuxunaffected: all versions before 3.16CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2.7 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/37cb9a81600da8250f24e25edc07253b62353cbeReferencevia CVE List
- git.kernel.org/stable/c/98247c8264d2076f81fa114bdfa2c2271953ac7cReferencevia CVE List
- git.kernel.org/stable/c/38ab2a435001a3c4dbeb70a52f5921e1ccd66f55Referencevia CVE List
- git.kernel.org/stable/c/f7bf57e94a5d6214b87be08486cb33836fbfa573Referencevia CVE List
- git.kernel.org/stable/c/4b772869a1e5f9da5cef5b9c722ec0aa424ee0a0Referencevia CVE List