CVE-2025-21759: ipv6: mcast: extend RCU protection in igmp6_send()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ipv6: mcast: extend RCU protection in igmp6_send()
igmp6_send() can be called without RTNL or RCU being held.
Extend RCU protection so that we can safely fetch the net pointer and avoid a potential UAF.
Note that we no longer can use sock_alloc_send_skb() because ipv6.igmp_sk uses GFP_KERNEL allocations which can sleep.
Instead use alloc_skb() and charge the net->ipv6.igmp_sk socket under RCU protection.
The Linux kernel CVE team has assigned CVE-2025-21759 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.26 with commit b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551 and fixed in 6.6.79 with commit 81b25a07ebf53f9ef4ca8f3d96a8ddb94561dd5a Issue introduced in 2.6.26 with commit b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551 and fixed in 6.12.16 with commit 0bf8e2f3768629d437a32cb824149e6e98254381 Issue introduced in 2.6.26 with commit b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551 and fixed in 6.13.4 with commit 8e92d6a413feaf968a33f0b439ecf27404407458 Issue introduced in 2.6.26 with commit b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551 and fixed in 6.14-rc3 with commit 087c1faa594fa07a66933d750c0b2610aa1a2946
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-21759
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/ipv6/mcast.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/81b25a07ebf53f9ef4ca8f3d96a8ddb94561dd5a https://git.kernel.org/stable/c/0bf8e2f3768629d437a32cb824149e6e98254381 https://git.kernel.org/stable/c/8e92d6a413feaf968a33f0b439ecf27404407458 https://git.kernel.org/stable/c/087c1faa594fa07a66933d750c0b2610aa1a2946