Long-lived Linux kernel flaw permits root container escape
A Linux kernel vulnerability present since 2011 can allow an unprivileged local attacker to gain root privileges and escape a Docker container, according to new technical research detailing an exploit for the flaw. Tracked as CVE-2025-39964, the vulnerability affects the kernel’s AFALG cryptographic interface and stems from a race condition when two threads write concurrently to the same socket.…
A flaw in the Linux kernel, discovered by Muhammad Alifa Ramdhan of STAR Labs, can enable an unprivileged local attacker to elevate privileges and escape a Docker container. This vulnerability, known as CVE-2025-39964, has been present since 2011 and impacts the kernel’s AFALG cryptographic interface. The issue stems from a race condition when two threads write simultaneously to the same socket. In 2025, the Linux kernel maintainers released a fix by preventing multiple writers from sharing an AFALG socket.
Ramdhan uncovered the vulnerability while conducting kernel audit work in September 2025. The code introducing the flaw was part of Linux 2.6.38, released in 2011. According to the Linux kernel CVE team, the vulnerability could cause inconsistent socket state during concurrent writes, leaving the socket’s internal state unpredictable. The patched solution grants exclusive write ownership, allowing only one writer to execute sendmsg() at a time.
AF_ALG is a userspace interface for cryptographic functions within the Linux kernel, allowing programs to open sockets for tasks such as symmetric encryption, hashing, and authenticated encryption without requiring elevated privileges. This accessibility means an ordinary local process can reach the vulnerable code path. An attacker controlling both sides of the race can exploit the kernel's scatter-gather structures, typically used to hold cryptographic input.
By carefully controlling the sequence of events, the exploit can manipulate the kernel’s memory, leading to arbitrary kernel memory exposure and a controlled kernel write, facilitating privilege escalation.
The exploit requires local access and no special privileges beyond low-level access, making it applicable to both unprivileged users within containers and those outside containers. STAR Labs received a $113,337 reward for successfully demonstrating the exploit, which allows an attacker to gain root privileges from an unprivileged account and potentially break out of a Docker container to gain full host root access.
The vulnerability cannot be remotely exploited over the network; an attacker must have local execution capabilities or operate within a container with access to the AF_ALG interface.
The fix has been backported to multiple stable kernel versions, including 5.10.245, 5.15.194, 6.1.154, 6.6.108, 6.12.49, and 6.16.9, with the latest mainline kernel (6.17) also containing the patch. Kernel maintainers recommend upgrading to the latest stable kernel rather than applying individual commits. The CVE announcement, issued on October 13, 2025, detailed the original introducing commit and warned that the list of unaffected releases might change as patches are backported.
Written by urgent.news from Arabian Post's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.