CVE-2025-40341
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40341 is a race condition vulnerability in the Linux kernel's futex (fast userspace mutex) implementation that allows unauthorized information disclosure. The flaw exists in sys_get_robust_list() and compat_get_robust_list(), where ptrace_may_access() is checked without synchronization against a concurrent exec() in the target process. This allows a low-privileged attacker to read the robust_list pointer of a process that transitions to a privileged state (e.g., via a setuid binary) during the race window. It was published on December 9, 2025, and carries a CVSS v3.1 base score of 5.5 (Medium) (Microsoft MSRC).

Technical details

The root cause is a time-of-check to time-of-use (TOCTOU) race condition (CWE-362) in the Linux kernel's futex subsystem. When a calling task invokes get_robust_list() on a target task T, ptrace_may_access() evaluates permissions based on T's current credentials. However, if T concurrently executes a setuid binary via exec(), its credentials and memory mappings change after the check but before T->robust_list is accessed — allowing the caller to read user-space pointers from a now-privileged process. The fix implements a read lock on signal->exec_update_lock prior to invoking ptrace_may_access(), ensuring the target task's exec state remains stable during credential validation (Microsoft MSRC).

Impact

Successful exploitation allows a low-privileged local attacker to read the robust_list pointer — a user-space memory address — from a process that has transitioned to a privileged state, constituting an unauthorized information disclosure. While the direct impact is limited to memory address leakage (no direct code execution or privilege escalation), this information could serve as a primitive in a larger exploit chain, for example to defeat ASLR in a subsequent attack against a setuid-root process. The CVSS score reflects high availability impact, though the primary real-world concern is confidentiality of privileged process memory layout (Microsoft MSRC).

Exploitation steps

  1. Gain local access: Obtain a low-privileged shell or code execution on the target Linux system.
  2. Identify a setuid target: Locate a setuid-root binary that is frequently executed by other users or processes (e.g., sudo, passwd, su).
  3. Spawn or monitor target process: Arrange for or wait for a target process T to be about to execute the setuid binary via exec().
  4. Race the exec() transition: Repeatedly call get_robust_list(pid_of_T) in a tight loop from attacker task A, attempting to invoke ptrace_may_access() while T is still unprivileged but before T->robust_list is read after the privilege transition.
  5. Capture the leaked pointer: When the race is won, the returned robust_list pointer reflects the user-space address from the now-privileged process's memory layout, potentially leaking ASLR information.
  6. Use as exploit primitive: Incorporate the leaked address into a subsequent exploit targeting the privileged process to bypass ASLR and achieve further impact.

Mitigation and workarounds

Apply the Linux kernel patch that introduces a read lock on signal->exec_update_lock before calling ptrace_may_access() in sys_get_robust_list() and compat_get_robust_list(). Patches are available in the stable kernel tree (commits 3b4222494489, 4aced32596ea, 6b54082c3ed4, 6511984d1aa1). Microsoft has released a patch for Azure Linux 3 (kernel 6.6.112.1-2 and later). Debian has also issued an advisory (DLA-4436-1) for Linux 6.1 LTS. As a workaround, restrict local user access and limit the ability of untrusted users to call ptrace-related syscalls via seccomp or similar mechanisms (Microsoft MSRC, Debian LTS).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64557NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-selftests-internal
NoNoJul 29, 2026
CVE-2026-64556NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-64k-devel
NoNoJul 29, 2026
CVE-2026-64555NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-fde-6.14
NoNoJul 27, 2026
CVE-2026-64554NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-gcp-6.14
NoYesJul 27, 2026
CVE-2026-64553NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-64k-debug-modules-internal
NoYesJul 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management