14-Year-Old Linux Kernel Flaw Lets Local Users Gain Root Access and Escape Containers
Linux kernel bug CVE-2025-39964 gives local users root and can escape Docker; CISA reports exploitation.
CVE-2025-39964 is a race condition in the Linux kernel AF_ALG cryptographic socket path, introduced in Linux 2.6.38 in 2011, that an unprivileged local process can use to gain root. STAR Labs researchers showed a proof of concept that also escaped a Docker container to the host because containers share the kernel, and Google’s kernelCTF reportedly paid $113,337. CISA has listed the CVE among vulnerabilities exploited in the wild. Upstream fixes add exclusive write ownership; patched stable lines cited include 5.10.246, 5.15.195, 6.1.155, 6.6.109, 6.12.50, and 6.16.10.
- CVE-2025-39964 is a race in the Linux AF_ALG sendmsg path.
- A local user can gain root and escape Docker on affected hosts.
- CISA lists the flaw among vulnerabilities exploited in the wild.
- Fixes include kernels 5.10.246, 5.15.195, 6.1.155, 6.6.109, 6.12.50, and 6.16.10.
- Google kernelCTF reportedly paid a $113,337 bounty.
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 article557 words · extracted from cybersecuritynews.com · click to collapse
A 14-year-old Linux kernel vulnerability can let a local attacker escalate to root privileges and, in a proof-of-concept environment, escape a Docker container to compromise the underlying host.
The flaw in Linux’s AF_ALG userspace cryptographic interface stems from unsafe concurrent writes to the same socket used for operations like AES encryption and decryption.
Because an unprivileged local process can access this interface, it presents a valuable attack surface for kernel researchers and attackers alike.
Security researcher Muhammad Alifa Ramdhan of STAR Labs discovered the issue in 2025 while auditing Linux kernel code for Google’s kernelCTF program.
The research, completed with colleague Bing-Jhong Billy Jheng, demonstrated that the bug could be developed into a reliable local privilege-escalation exploit. The kernelCTF submission reportedly received a $113,337 reward.
CISA has also listed CVE-2025-39964 among vulnerabilities reported as exploited in the wild, increasing the urgency of patching.
14-Year-Old Linux Kernel Flaw
The underlying issue is a race condition in the AF_ALG sendmsg() handling path. Normally, the kernel collects cryptographic input across one or more requests and tracks those buffers using scatter-gather lists. A context flag named merge indicates that the final buffer has unused page space and that new data can be appended safely.

However, two threads can issue writes against the same AF_ALG operation socket. While the socket lock protects most state changes, the kernel releases that lock while a thread waits for writable buffer space. This permits another writer to modify the shared context before the original thread resumes.
According to IDNsec research, attackers can manipulate timing to leave ctx->merge enabled while the final scatter-gather list has no valid entries, causing a subsequent write to access metadata before the intended array via sg[-1].
That out-of-bounds access becomes dangerous because attacker-controlled heap data can influence the fake scatterlist metadata. Researchers used the condition to create a usercopy oracle and ultimately derive an arbitrary kernel write primitive. The exploit then overwrites core_pattern, a kernel setting that controls how Linux handles process core dumps.
When core_pattern begins with a pipe character, Linux executes the configured program as a core-dump handler. By replacing this value and crashing a child process, the proof of concept runs the attacker-controlled binary with root privileges.
Since containers share the host kernel, the same kernel-level primitive can enable a Docker container escape in affected configurations.
The vulnerable code was introduced with Linux 2.6.38 in 2011 and remained exposed for roughly 14 years. Affected versions include kernels before the fixed stable releases, subject to distribution backports. Public advisories identify fixed versions including Linux 5.10.246, 5.15.195, 6.1.155, 6.6.109, 6.12.50, and 6.16.10.
Upstream Linux developers fixed the problem by adding exclusive write ownership to AF_ALG contexts. The patch introduces a ctx->write state check, causing a second concurrent writer to fail rather than alter the socket’s shared state.
Administrators should promptly install their distribution’s patched kernel package and reboot into the updated kernel. Organizations should prioritize shared Linux infrastructure, container hosts, multi-user systems, and environments where untrusted local code or tenant workloads can execute.
Cut every SOC alert investigation by 21 min. Power your SOC with instant IOC context for immediate response: Integrate TI Lookup in your SOC
Abinayahttps://cybersecuritynews.com/
Abi is a Security Editor and fellow reporter with Cyber Security News. She is covering various cyber security incidents happening in the Cyber Space.