{"id":"CVE-2025-21758","state":"PUBLISHED","title":"ipv6: mcast: add RCU protection to mld_newpack()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nipv6: mcast: add RCU protection to mld_newpack()\n\nmld_newpack() can be called without RTNL or RCU being held.\n\nNote that we no longer can use sock_alloc_send_skb() because\nipv6.igmp_sk uses GFP_KERNEL allocations which can sleep.\n\nInstead use alloc_skb() and charge the net->ipv6.igmp_sk\nsocket under RCU protection.","publishedAt":"2025-02-27T02:18:12.496Z","updatedAt":"2026-10-15T01:04:02.341Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"29fa42197f26a97cde29fa8c40beddf44ea5c8f3","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"e8af3632a7f2da83e27b083f787bced1faba00b1","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"1b91c597b0214b1b462eb627ec02658c944623f2","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"25195f9d5ffcc8079ad743a50c0409dbdc48d98a","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"d60d493b0e65647e0335e6a7c4547abcea7df8e9","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"a527750d877fd334de87eef81f1cb5f0f0ca3373","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/mcast.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.26","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.26","versionType":"semver"},{"version":"5.15.179","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.79","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.16","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.4","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/mcast.c"]}],"references":["https://git.kernel.org/stable/c/29fa42197f26a97cde29fa8c40beddf44ea5c8f3","https://git.kernel.org/stable/c/e8af3632a7f2da83e27b083f787bced1faba00b1","https://git.kernel.org/stable/c/1b91c597b0214b1b462eb627ec02658c944623f2","https://git.kernel.org/stable/c/25195f9d5ffcc8079ad743a50c0409dbdc48d98a","https://git.kernel.org/stable/c/d60d493b0e65647e0335e6a7c4547abcea7df8e9","https://git.kernel.org/stable/c/a527750d877fd334de87eef81f1cb5f0f0ca3373","https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","https://cert-portal.siemens.com/productcert/html/ssa-082556.html","https://cert-portal.siemens.com/productcert/html/ssa-019113.html","https://cert-portal.siemens.com/productcert/html/ssa-457936.html","https://cert-portal.siemens.com/productcert/html/ssa-784472.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:39.238Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/21xxx/CVE-2025-21758.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-21758","state":"PUBLISHED","datePublished":"2025-02-27T02:18:12.496Z","dateUpdated":"2026-10-15T01:04:02.341Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-29T08:45:45.761Z"},"containers":{"cna":{"title":"ipv6: mcast: add RCU protection to mld_newpack()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nipv6: mcast: add RCU protection to mld_newpack()\n\nmld_newpack() can be called without RTNL or RCU being held.\n\nNote that we no longer can use sock_alloc_send_skb() because\nipv6.igmp_sk uses GFP_KERNEL allocations which can sleep.\n\nInstead use alloc_skb() and charge the net->ipv6.igmp_sk\nsocket under RCU protection."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"29fa42197f26a97cde29fa8c40beddf44ea5c8f3","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"e8af3632a7f2da83e27b083f787bced1faba00b1","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"1b91c597b0214b1b462eb627ec02658c944623f2","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"25195f9d5ffcc8079ad743a50c0409dbdc48d98a","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"d60d493b0e65647e0335e6a7c4547abcea7df8e9","versionType":"git"},{"version":"b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551","status":"affected","lessThan":"a527750d877fd334de87eef81f1cb5f0f0ca3373","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/mcast.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.26","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.26","versionType":"semver"},{"version":"5.15.179","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.129","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.79","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.16","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13.4","status":"unaffected","lessThanOrEqual":"6.13.*","versionType":"semver"},{"version":"6.14","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/mcast.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/29fa42197f26a97cde29fa8c40beddf44ea5c8f3"},{"url":"https://git.kernel.org/stable/c/e8af3632a7f2da83e27b083f787bced1faba00b1"},{"url":"https://git.kernel.org/stable/c/1b91c597b0214b1b462eb627ec02658c944623f2"},{"url":"https://git.kernel.org/stable/c/25195f9d5ffcc8079ad743a50c0409dbdc48d98a"},{"url":"https://git.kernel.org/stable/c/d60d493b0e65647e0335e6a7c4547abcea7df8e9"},{"url":"https://git.kernel.org/stable/c/a527750d877fd334de87eef81f1cb5f0f0ca3373"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The half of the race that mutates `dev->nd_net` (`dev_change_net_namespace()` / netns teardown) requires local action — network namespace creation and device moves — so the attack must be mounted locally. The MLD report path itself is also reachable by an adjacent attacker's MLD Query, but a remote peer alone cannot create the racing `dev_net()` mutation.\nAC:L - The attacker controls both sides of the race: they schedule the MLD report work at will (unprivileged multicast join, or by driving `igmp6_event_query`) and simultaneously perform the netns creation/destruction or device namespace move that flips `dev->nd_net`, looping until the window is hit. `cancel_delayed_work()` in `mld_ifc_stop_work`/`mld_gq_stop_work` is non-synchronous and `__mld_query_work` can re-arm `mc_gq_work` afterwards, so no barrier closes the window.\nPR:L - Joining an IPv6 multicast group via `setsockopt(IPV6_ADD_MEMBERSHIP)` needs no privilege at all, and the netns/netdev manipulation side is reachable by an ordinary user through unprivileged user namespaces (`unshare -Urn` grants CAP_NET_ADMIN inside the new netns). No real root in the init namespace is required.\nUI:N - The attacker drives both the multicast join and the namespace churn from their own processes; no victim action or cooperation is needed.\nS:U - The corruption is confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The stale `struct net *` yields a use-after-free read of freed slab memory and a dangling `struct sock *`, and `ip6_mc_hdr()` copies `inet6_sk(sk)->hop_limit` out of that freed object directly into a transmitted IPv6 header — leaking reclaimed kernel heap contents onto the network, with the UAF generally usable as a broader read primitive.\nI:H - `sock_alloc_send_skb()` performs refcount and ownership writes into the freed socket, and the skb's `sock_wfree` destructor later makes an indirect call through `sk->sk_write_space` in memory an unprivileged attacker can reclaim by spraying raw IPv6 sockets — a control-flow hijack primitive, not merely a stray write.\nA:H - Dereferencing a freed `struct net`/`struct sock` reliably oopses or panics the kernel (KASAN-detectable UAF), and the race can be retried in a loop until it lands."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:54:10.964Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.26","versionEndExcluding":"5.15.179"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.26","versionEndExcluding":"6.1.129"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.26","versionEndExcluding":"6.6.79"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.26","versionEndExcluding":"6.12.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.26","versionEndExcluding":"6.13.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.26","versionEndExcluding":"6.14"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:37:03.144Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.6","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.7","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.6","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.7","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.6","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.7","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.6","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.7","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.5","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.6","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.7","status":"affected","lessThan":"*","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:04:02.341Z"},"x_adpType":"supplier"}]}}}