Blog

Linux Kernel “Copy Fail” Local Privilege Escalation (LPE), CVE-2026-31431, Under Active Exploitation

Posted by: Peled Eldan, Ryan Blanchard
May 01, 2026
Getting your Trinity Audio player ready...

Overview

On April 29, 2026, cybersecurity researchers disclosed a high-severity logic vulnerability in the Linux kernel, tracked as CVE-2026-31431 and nicknamed “Copy Fail”. The flaw allows an unauthenticated local user to gain root privileges by exploiting a 9-year-old error in the kernel’s cryptographic subsystem. Unlike many kernel vulnerabilities that rely on probabilistic memory corruption or race conditions, Copy Fail is a deterministic logic flaw that works reliably across various distributions, leading to its inclusion in major security threat catalogs.

The Threat

Successful exploitation of Copy Fail enables an attacker to bypass critical security boundaries within the Linux environment. It effectively turns the kernel’s shared page cache against itself, allowing an unprivileged process to modify the memory representation of read-only files owned by root.

Metric

Details

CVSS Score

7.8 (High)

Affected Versions

Linux Kernel versions 4.14 through 7.0 (all versions since 2017). This includes Ubuntu 24.04 LTS, Amazon Linux 2023, RHEL 10.1, and SUSE 16.

Root Cause

Logic flaw in the algif_aead module (AF_ALG) due to an unsafe in-place optimization (CWE-807).

Exploit Vector

Local; requires unprivileged code execution to trigger a 4-byte write to the system page cache.

Active Exploitation

Confirmed; public Proof-of-Concept (PoC) exploits are available and functioning on major distributions.

 

Real-World Impact

“Copy Fail” transforms a standard local exploit into a hidden failure of the Linux security model by weaponizing the kernel’s own efficiency. A single unprivileged process can become a widespread incident, presenting a few unique challenges for security teams:

  • Container Escape: Because the Linux page cache is shared between the host and containers, a write triggered from within a container can compromise the underlying host and all other hosted tenants.
  • Full System Takeover: Attackers can obtain a root shell by modifying the in-memory representation of setuid binaries (e.g., /usr/bin/su) to grant access without valid credentials.
  • Forensic Evasion: The exploit leaves no traces on the physical storage device, as all modifications occur in volatile memory, evading traditional file integrity monitoring (FIM) tools.


The Exploit Chain: A Technical Breakdown

The “Copy Fail” exploit leverages the Linux Kernel’s Userspace Crypto API (AF_ALG) through a series of deterministic steps:

  1. AF_ALG Socket Initialization: The attacker opens a socket to the kernel’s cryptographic subsystem specifically using the authencesn template.
  2. Page Cache Linking: Using the splice() system call, the attacker links a sensitive read-only file (like a setuid-root binary) into a writable scatterlist buffer.
  3. In-Place Logic Trigger: Due to a performance optimization introduced in 2017, the kernel incorrectly treats the destination scatterlist as scratch space during certain AEAD operations.
  4. Controlled Memory Overwrite: The kernel writes four specific bytes past the intended buffer and directly into the cached copy of the targeted file in the system’s memory.
  5. Privilege Escalation: When the target binary is executed, the modified version in the page cache—now containing the attacker’s 4-byte patch—runs with root privileges.

Immediate Recommendations

  • Patch Immediately: Install the latest kernel security updates from your distribution vendor.
  • Interim Mitigation: If patching is not immediately possible, disable the algif_aead kernel module to prevent socket creation: echo “install algif_aead /bin/false” > /etc/modprobe.d/disable-algif.conf
  • Container Hardening: Update seccomp policies to block the creation of AF_ALG sockets within containerized workloads to prevent escape attempts.

References & Further Reading

How XM Cyber Can Help

XM Cyber is working to quickly add support for Copy Fail within our platform, and actively engaging customers to identify exposure and implement mitigation strategies at scale. Organizations can immediately understand the prevalence of CVE-2026-31431 by identifying Linux Kernel versions 4.14 through 7.0 and implementing recommended patches. 


mxcyber

Peled Eldan

See what attackers see, so you can stop them from doing what attackers do.

See XM Cyber In Action