CVE-2025-38465: netlink: Fix wraparounds of sk->sk_rmem_alloc.
In the Linux kernel, the following vulnerability has been resolved:
netlink: Fix wraparounds of sk->skrmemalloc.
Netlink has this pattern in some places
if (atomicread(&sk->skrmemalloc) > sk->skrcvbuf) atomicadd(skb->truesize, &sk->skrmemalloc);
, which has the same problem fixed by commit 5a465a0da13e ("udp: Fix multiple wraparounds of sk->skrmemalloc.").
For example, if we set INTMAX to SORCVBUFFORCE, the condition is always false as the two operands are of int.
Then, a single socket can eat as many skb as possible until OOM happens, and we can see multiple wraparounds of sk->skrmemalloc.
Let's fix it by using atomicaddreturn() and comparing the two variables as unsigned int.
Before: [root@fedora ~]# ss -f netlink Recv-Q Send-Q Local Address:Port Peer Address:Port -1668710080 0 rtnl:nlwraparound/293
After: [root@fedora ~]# ss -f netlink Recv-Q Send-Q Local Address:Port Peer Address:Port 2147483072 0 rtnl:nlwraparound/290 ^ --- INTMAX - 576
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch 5a465a0da13e
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38465?
CVE-2025-38465 has been rated as a moderate severity vulnerability.
How do I fix CVE-2025-38465?
To fix CVE-2025-38465, update your Linux kernel to the latest patched version provided by your distribution maintainers.
What systems are affected by CVE-2025-38465?
CVE-2025-38465 affects various versions of the Linux kernel that utilize netlink functionality.
What type of attack does CVE-2025-38465 allow?
CVE-2025-38465 can potentially allow an attacker to cause a denial of service through resource exhaustion.
Is CVE-2025-38465 easy to exploit?
Exploitation of CVE-2025-38465 may require local access or specific conditions to be met.