igmp: convert struct ip_sf_list to RCU
Published Sep 25, 2026
No CVSS score
EPSS 0.17%
Description
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.
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints-
- Version StatusaffectedConstraints-
- Version StatusaffectedConstraints-
- Version StatusaffectedConstraints-
- Version StatusaffectedConstraints-
- Version StatusaffectedConstraints-
- Version StatusaffectedConstraints-
- Version StatusaffectedConstraints-
- Version
-
- Version 4.14.247StatusaffectedConstraints<4.15
- Version 4.19.207StatusaffectedConstraints<4.20
- Version 4.4.284StatusaffectedConstraints<4.5
- Version 4.9.283StatusaffectedConstraints<4.10
- Version 5.10.64StatusaffectedConstraints<5.11
- Version 5.13.16StatusaffectedConstraints<5.14
- Version 5.14.3StatusaffectedConstraints<5.15
- Version 5.4.145StatusaffectedConstraints<5.5
- Version
-
- Version 5.15StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<5.15
- Version 6.12.111StatusunaffectedConstraints<=6.12.*
- Version 6.18.53StatusunaffectedConstraints<=6.18.*
- Version 7.2.7StatusunaffectedConstraints<=7.2.*
- Version 7.3-rc2StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux | unaffected |
| |||||||||||||||||||||||||||||||||||||||
| Linux | Linux | unaffected |
| |||||||||||||||||||||||||||||||||||||||
| Linux | Linux | affected |
|
No data.
No data.
No Red Hat product state for this CVE.
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
Not enough EPSS history yet for a chart. At least two recorded scores are needed.
Percentile over time
Not enough EPSS history yet for a chart. At least two recorded scores are needed.
No CWE recorded.
References (4)
- https://git.kernel.org/stable/c/2987ee196c88dbde0463dc87d5fb209c684e34a2
- https://git.kernel.org/stable/c/d3011d1f293478c730aa0870490afa145c37600e
- https://git.kernel.org/stable/c/e3206419bdb04e2087d8cc6be324df8639b3fac5
- https://git.kernel.org/stable/c/f5182dfad54277267a8cb0c004a9cd4cf35aeebb
Change history (0)
No recorded changes yet.