CVE-2025-38465

netlink: Fix wraparounds of sk->sk_rmem_alloc.

State
Published
Severity
Not scored
Published
Jul 25, 2025
Updated
Oct 15, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before 9da025150b7c14a8390fc06aea314c0a4011e82cAffected
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before c4ceaac5c5ba0b992ee1dc88e2a02421549e5c98Affected
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before fd69af06101090eaa60b3d216ae715f9c0a58e5bAffected
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before 76602d8e13864524382b0687dc32cd8f19164d5aAffected
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before 55baecb9eb90238f60a8350660d6762046ebd3bdAffected
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before 4b8e18af7bea92f8b7fb92d40aeae729209db250Affected
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before cd7ff61bfffd7000143c42bbffb85eeb792466d6Affected
  • 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to before ae8f160e7eb24240a2a79fc4c815c6a0d4ee16ccAffected
LinuxLinux
  • 2.6.12Affected
  • before 2.6.12Not affected
  • 5.4.296 through 5.4.*Not affected
  • 5.10.240 through 5.10.*Not affected
  • 5.15.189 through 5.15.*Not affected
  • 6.1.146 through 6.1.*Not affected
  • 6.6.99 through 6.6.*Not affected
  • 6.12.39 through 6.12.*Not affected
  • 6.15.7 through 6.15.*Not affected
  • 6.16 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.