14-Year-Old Linux Kernel Vulnerability Enables Root Access and Docker Escape
Linux kernel flaw CVE-2025-39964 enables local root and Docker escape and is listed in CISA's KEV catalog.
CVE-2025-39964 is a race condition in the Linux kernel AF_ALG interface that has existed since Linux 2.6.38 in 2011 and was fixed in 2025. An unprivileged local attacker can turn an out-of-bounds access during concurrent socket writes into a kernel write, overwrite core_pattern, and execute code as root; researchers also used it to escape a Docker container because containers share the host kernel. STAR Labs researcher Muhammad Alifa Ramdhan and Bing-Jhong Billy Jheng received $113,337 from Google for the chain. Fixed stable versions include 5.10.245, 5.15.194, 6.1.154, 6.6.108, 6.12.49, and 6.16.9, and CISA added the CVE to its Known Exploited Vulnerabilities catalog on September 18, 2026.
- A local race in af_alg_sendmsg can yield root.
- Shared kernel access enabled a tested Docker container escape.
- Fixed kernels include 5.10.245, 5.15.194, 6.1.154, 6.6.108, 6.12.49, and 6.16.9.
- CISA added CVE-2025-39964 to the KEV catalog on September 18, 2026.
Vulnerabilities mentionedAll →
- CVE-2025-399645.5<1%Race Condition in Linux Kernel Crypto Socket (af_alg_sendmsg)published · Linux kernel KEV
| CVE | Vulnerability | CVSS | EPSS | Flags | Affected | Exposure | Published |
|---|---|---|---|---|---|---|---|
| CVE-2025-39964 | Race Condition in Linux Kernel Crypto Socket (af_alg_sendmsg) CVE-2025-39964 is a race condition (CWE-362) in the Linux kernel's AF_ALG crypto socket interface: the af_alg_sendmsg function did not prevent concurrent writes to the same socket, so two simultaneous writes could interleave data unpredictably and leave the kernel's internal socket state inconsistent. It is triggered by a local user (or local process) issuing concurrent write/sendmsg operations on the same AF_ALG socket, which is why the CVSS v3.1 score is low (3.3, local vector, low availability impact). An attacker exploiting the race primarily gains the ability to corrupt socket state, with potential for degraded availability; confidentiality and integrity are not rated as impacted. Any Linux kernel deployment whose build includes the vulnerable af_alg code is affected, though exploitation requires the ability to run local code that uses the crypto socket API. CISA added the flaw to the Known Exploited Vulnerabilities catalog on 2026-09-18, indicating known exploitation in the wild per CISA, but no public proof-of-concept is known and ransomware use is unknown; EPSS estimates a 0.3% probability of exploitation in the next 30 days. |
Full article636 words · extracted from gbhackers.com · click to collapse
A vulnerability in the Linux kernel’s AF_ALG cryptographic interface, which has existed for 14 years, can let an unprivileged local attacker gain root access and escape a Docker container by exploiting a race condition in concurrent socket writes.
This flaw, tracked as CVE-2025-39964, was discovered in 2025 by STAR Labs researcher Muhammad Alifa Ramdhan, with help from Bing-Jhong Billy Jheng to complete the exploitation chain.
Their working Linux kernel CTF submission earned them a reward of $113,337 from Google. The vulnerable code originated in Linux 2.6.38, released in 2011, allowing the defect to go unnoticed for roughly 14 years before its correction in 2025.
14-Year-Old Linux Kernel Flaw
The AF_ALG interface exposes kernel cryptographic operations, including hashing, symmetric encryption, authenticated encryption, and random number generation, to user-space applications via standard sockets.
Programs can create an AF_ALG socket, choose an algorithm, and use send or write calls to provide data, subsequently retrieving results through read or receive operations. Significantly, this interface is accessible from unprivileged user space, making flaws within it an appealing attack target.
The vulnerability resides in the function `af_alg_sendmsg()`, which collects supplied input in transmit scatter-gather lists. A shared `af_alg_ctx` structure maintains state information regarding whether more data is expected and whether new input can be merged into the remaining space on the last allocated page.
Although `lock_sock()` initially appears to ensure serialized writes, the kernel releases that lock while a writer waits for socket memory. This behavior allows two threads to perform unfinished `sendmsg()` operations against the same socket.
A carefully timed interleaving, combined with a failed userspace copy, can set `ctx->merge` to true. At the same time, the newest scatterlist has `cur` equal to zero.
Following this, a write operation assumes that a valid final entry exists and computes `sgl->sg + sgl->cur – 1`. With `cur` set to zero, the kernel instead accesses `sg[-1]`, reading metadata from memory that immediately precedes the allocation.
According to IDNSec, Attackers can exploit this by heap-spraying a neighboring object, influencing the fake `page_link` value used to calculate the destination for `memcpy_from_msg()`.
The exploit transforms this out-of-bounds metadata access into a write primitive using usercopy fault handling as an oracle. When a guessed destination maps to writable memory, `sendmsg()` succeeds; when it is unmapped, the copy returns EFAULT without crashing the kernel.
By repeatedly probing, the attacker can identify the calculated location, allowing them to redirect writes to the kernel page that contains `core_pattern`.

By replacing `core_pattern` with a command pointing to the exploit binary and deliberately crashing a child process, the researchers succeeded in executing their binary as the root-privileged core-dump handler.
Because a container shares the host’s kernel and AF_ALG is accessible in the tested Docker environment, this exploit provided root access on the host, enabling a container escape.
The upstream fix implements exclusive write ownership through `ctx->write`. A second writer attempting `sendmsg()` on the same AF_ALG socket will now receive an EBUSY error until the first operation completes, thereby preventing the inconsistent state.
Administrators are advised to install kernel updates provided by their distribution; stable fixed versions include 5.10.245, 5.15.194, 6.1.154, 6.6.108, 6.12.49, and 6.16.9.
This change enforces the single-writer assumption that AF_ALG previously relied upon during memory-pressure waits, interleaved operations, copy failures, and error-path cleanup within `af_alg_sendmsg()`.

CISA added CVE-2025-39964 to its Known Exploited Vulnerabilities catalog on September 18, 2026, underscoring the urgency of patching. Organizations should inventory host and container kernels, prioritize internet-facing and multi-tenant systems, and restrict AF_ALG through security policies where operationally feasible until updates are deployed.
Cut every SOC alert investigation by 21 min. Power your SOC with instant IOC context for immediate response: Integrate TI Lookup in your SOC
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.