igmp: convert struct ip_sf_list to RCU
Linux Linux
At a glance
In the Linux kernel, the following vulnerability has been resolved: igmp: convert struct ip_sf_list to RCU Commit 23d2b94043ca ("igmp: Add ip_mc_list lock in ip_check_mc_rcu") added spin_lock_bh(&im->lock) to ip_check_mc_rcu() to prevent a use-after-free while iterating im->sources during concurrent deletions. However, ip_check_mc_rcu() is called from RCU read-side critical sections in packet receive and route lookup fast paths (e.g. __mkroute_output(), ip_route_input_rcu(), and __udp4_lib_rcv()). When igmpv3_send_cr() or igmpv3_send_report() holds &pmc->lock and calls add_grec() -> igmpv3_newpack() -> ip_route_output_ports(), an XFRM policy matching a multicast destination triggers xfrm_tmpl_resolve_one() -> xfrm4_get_saddr() -> __mkroute_output() -> ip_check_mc_rcu(). This attempts to acquire &im->lock while &pmc->lock is already held on the same CPU, triggering a lockdep recursive locking warning / deadlock. Fix this by converting IPv4 struct ip_sf_list to RCU, mirroring the IPv6 implementation in net/ipv6/mcast.c: 1. Add struct rcu_head to struct ip_sf_list and annotate sf_next, sources, and tomb as __rcu pointers. 2. Use rcu_assign_pointer() and kfree_rcu() for list updates and deletions. 3. Remove spin_lock_bh(&im->lock) from ip_check_mc_rcu() and traverse im->sources locklessly with for_each_psf_rcu(), reading and writing counter fields with…
Full source description
In the Linux kernel, the following vulnerability has been resolved: igmp: convert struct ip_sf_list to RCU Commit 23d2b94043ca ("igmp: Add ip_mc_list lock in ip_check_mc_rcu") added spin_lock_bh(&im->lock) to ip_check_mc_rcu() to prevent a use-after-free while iterating im->sources during concurrent deletions. However, ip_check_mc_rcu() is called from RCU read-side critical sections in packet receive and route lookup fast paths (e.g. __mkroute_output(), ip_route_input_rcu(), and __udp4_lib_rcv()). When igmpv3_send_cr() or igmpv3_send_report() holds &pmc->lock and calls add_grec() -> igmpv3_newpack() -> ip_route_output_ports(), an XFRM policy matching a multicast destination triggers xfrm_tmpl_resolve_one() -> xfrm4_get_saddr() -> __mkroute_output() -> ip_check_mc_rcu(). This attempts to acquire &im->lock while &pmc->lock is already held on the same CPU, triggering a lockdep recursive locking warning / deadlock. Fix this by converting IPv4 struct ip_sf_list to RCU, mirroring the IPv6 implementation in net/ipv6/mcast.c: 1. Add struct rcu_head to struct ip_sf_list and annotate sf_next, sources, and tomb as __rcu pointers. 2. Use rcu_assign_pointer() and kfree_rcu() for list updates and deletions. 3. Remove spin_lock_bh(&im->lock) from ip_check_mc_rcu() and traverse im->sources locklessly with for_each_psf_rcu(), reading and writing counter fields with READ_ONCE() and WRITE_ONCE(). Note: RCU conversion of /proc/net/mcfilter will be done in a separate patch.
Source description · CVE List / CNA
System impact
CVSS summary v3.1
- Published:
- Updated:
- EPSS:
- 0.17%
- Exploited in attacks:
- Not confirmed
- Ransomware campaigns:
- Not confirmed
- Attack vector:
- Local
Affected software
Vendor, product and affected version ranges.
| Vendor | Product | Affected versions |
|---|---|---|
| Vendor:Linux | Linux | Affected versions:≥ 4.4.284, < 4.5Show full version range for Linux≥ 4.9.283, < 4.10≥ 4.14.247, < 4.15≥ 4.19.207, < 4.20≥ 5.4.145, < 5.5≥ 5.10.64, < 5.11≥ 5.13.16, < 5.14≥ 5.14.3, < 5.155.15
Git commit ranges (source code)
|
| Vendor:Red Hat | Red Hat Enterprise Linux 10 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Enterprise Linux 6 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Enterprise Linux 8 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat Enterprise Linux 9 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat OpenShift Container Platform 4 | Affected versions:Source does not specify a version range |
| Vendor:Red Hat | Red Hat OpenShift Container Platform 5 | Affected versions:Source does not specify a version range |
| Vendor:SUSE | SUSE Linux Enterprise Desktop 15 SP7 | Affected versions:Source does not specify a version range |
| Vendor:SUSE | SUSE Linux Enterprise High Availability Extension 15 SP7 | Affected versions:Source does not specify a version range |
| Vendor:SUSE | SUSE Linux Enterprise High Performance Computing 12 SP5 | Affected versions:Source does not specify a version range |
1–10 of 39 · Page 1 of 4
CVSS scores and metrics3
[email protected] · NVD (Primary)Primary7.8 / 10HighCVSS 3.1Details
- Attack complexity
- Low
- Confidentiality
- High
- Integrity
- High
- Availability
- High
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HRed Hat · Red Hat VEX (adp)5.5 / 10MediumCVSS 3.1Details
- Attack complexity
- Low
- Confidentiality
- None
- Integrity
- None
- Availability
- High
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HSUSE · SUSE VEX (adp)5.5 / 10MediumCVSS 3.1Details
- Attack complexity
- Low
- Confidentiality
- None
- Integrity
- None
- Availability
- High
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Not required
- Scope
- Unchanged
Source vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.
This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences