Linux: ipv6: mcast: fix RCU list diversion in ip6_mc_del1_src()
What fixes it
- 4352737297b262e8367675c19a7dc6a9f53c97afLinuxCVE List
- 8d4fe5c13f5056faa6deb09a90e24a89f9ebfad4LinuxCVE List
- 5149c60c406595b56fda0c6e9aae7fd287f636aaLinuxCVE List
- 93b49239840b91313adbd77b8b52993eff2d08c1LinuxCVE List
- 5.11LinuxCVE 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:
ipv6: mcast: fix RCU list diversion in ip6_mc_del1_src()
When removing a source filter whose count reaches zero, ip6_mc_del1_src() unlinks psf from pmc->mca_sources. If the filter was previously active, the code moved psf directly into pmc->mca_tomb by updating psf->sf_next.
Because pmc->mca_sources is traversed locklessly under RCU (e.g. by ipv6_chk_mcast_addr()), mutating psf->sf_next before a grace period elapses diverts concurrent readers to the tombstone list. Consequently, readers miss remaining active sources in pmc->mca_sources and improperly examine deleted tombstone entries.
Fix this by allocating a new tombstone node for pmc->mca_tomb (as done in sf_setstate()) and retiring the original psf via kfree_rcu().
Text from CVE List
Affected versions 14
- Linuxaffected: 4b200e398953c237c86d32bf26d4cb2a96556a6f before c3343cd7ec8706c221e52b782f386b9af14a928aCVE List
- Linuxaffected: 4b200e398953c237c86d32bf26d4cb2a96556a6f before 4352737297b262e8367675c19a7dc6a9f53c97afCVE List
- Linuxaffected: 4b200e398953c237c86d32bf26d4cb2a96556a6f before 8d4fe5c13f5056faa6deb09a90e24a89f9ebfad4CVE List
- Linuxaffected: 4b200e398953c237c86d32bf26d4cb2a96556a6f before 5149c60c406595b56fda0c6e9aae7fd287f636aaCVE List
- Linuxaffected: 4b200e398953c237c86d32bf26d4cb2a96556a6f before 93b49239840b91313adbd77b8b52993eff2d08c1CVE List
- Linuxaffected: 86c49119f0353f857cc08030ec9e4ebaab3d5a64CVE List
- Linuxaffected: 5.10.261 before 5.11CVE List
- Linuxaffected: 5.13CVE List
- Linuxunaffected: all versions before 5.13CVE 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/c3343cd7ec8706c221e52b782f386b9af14a928aReferencevia CVE List
- git.kernel.org/stable/c/4352737297b262e8367675c19a7dc6a9f53c97afReferencevia CVE List
- git.kernel.org/stable/c/8d4fe5c13f5056faa6deb09a90e24a89f9ebfad4Referencevia CVE List
- git.kernel.org/stable/c/5149c60c406595b56fda0c6e9aae7fd287f636aaReferencevia CVE List
- git.kernel.org/stable/c/93b49239840b91313adbd77b8b52993eff2d08c1Referencevia CVE List