Junglewise Threat Intelligence

CVE-2025-38617: Linux Kernel race condition in AF_PACKET packet_set_ring

CVE-2025-38617 · Severity: high · CVSS 7.8 · Published 2025-08-22

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A race condition vulnerability exists in the Linux kernel's packet socket subsystem, which is responsible for low-level network traffic handling. An attacker with basic local access can exploit this flaw to gain full administrative control (root privileges) over the system or escape from a container. This vulnerability is particularly significant because it has existed in the kernel for nearly 20 years and affects a wide range of Linux distributions.

Technical details

A race condition exists between packet_set_ring() and packet_notifier() in net/packet/af_packet.c. When packet_set_ring() temporarily releases the po->bind_lock, a concurrent NETDEV_UP event processed by packet_notifier() can register a protocol hook for a socket that is in an inconsistent state. This leads to a use-after-free (UAF) vulnerability when tpacket_rcv() accesses memory that has been freed or reallocated. An unprivileged local attacker with CAP_NET_RAW (often obtainable via user namespaces) can exploit this to corrupt kernel memory, bypass KASLR, and achieve arbitrary code execution. The fix involves ensuring the socket remains unhooked by setting po->num to zero while the lock is released.

Affected products

  • Linux Linux Kernel 2.6.12 through 6.15

Timeline

  • 2025-08-01: patched: Initial patch submitted by Quang Le
  • 2025-08-22: disclosed: CVE published
  • 2026-03-03: other: Detailed exploit write-up published by Calif

References

Related threats