CVE-2025-38465

MEDIUM

Linux Kernel < 5.4.296 - Memory Leak

Title source: rule
STIX 2.1

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

Scores

CVSS v3 5.5
EPSS 0.0002
EPSS Percentile 6.7%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Details

CWE
CWE-401
Status published
Products (11)
debian/debian_linux 11.0
linux/Kernel 2.6.12 - 5.4.296linux
linux/Kernel 5.11.0 - 5.15.189linux
linux/Kernel 5.16.0 - 6.1.146linux
linux/Kernel 5.5.0 - 5.10.240linux
linux/Kernel 6.13.0 - 6.15.7linux
linux/Kernel 6.2.0 - 6.6.99linux
linux/Kernel 6.7.0 - 6.12.39linux
linux/linux_kernel 2.6.12 (5 CPE variants)
linux/linux_kernel 6.16 rc1 (5 CPE variants)
... and 1 more
Published Jul 25, 2025
Tracked Since Feb 18, 2026