Skip to content
Not rated

CVE-2025-38465 netlink: Fix wraparounds of sk->sk_rmem_alloc.

Description

In the Linux kernel, the following vulnerability has been resolved: netlink: Fix wraparounds of sk->sk_rmem_alloc. Netlink has this pattern in some places if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf) atomic_add(skb->truesize, &sk->sk_rmem_alloc); , which has the same problem fixed by commit 5a465a0da13e ("udp: Fix multiple wraparounds of sk->sk_rmem_alloc."). For example, if we set INT_MAX to SO_RCVBUFFORCE, 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->sk_rmem_alloc. Let's fix it by using atomic_add_return() 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:nl_wraparound/293 * After: [root@fedora ~]# ss -f netlink Recv-Q Send-Q Local Address:Port Peer Address:Port 2147483072 0 rtnl:nl_wraparound/290 * ^ `--- INT_MAX - 576

Affected products and versions

Product Affected versions Fixed in
Linux 6.16 earliest → < 6.16 6.16
Linux 6.15 earliest → < 6.15.7 6.15.7
Linux 6.12 earliest → < 6.12.39 6.12.39
Linux 6.6 earliest → < 6.6.99 6.6.99
Linux 6.1 earliest → < 6.1.146 6.1.146
Linux 5.15 earliest → < 5.15.189 5.15.189
Linux 5.10 earliest → < 5.10.240 5.10.240
Linux 5.4 earliest → < 5.4.296 5.4.296
Linux 2.6.12 No fix stated
Show the 3 other branches
Product Affected versions Fixed in
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP 3.1 3.1.5 → latest No fix stated
SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP 3.1 3.1.5 → latest No fix stated
SIPLUS S7-1500 CPU 1518-4 PN/DP MFP 3.1 3.1.5 → latest No fix stated
The 18286 CVEs of Linux →
Track this CVE