SecPod

Learn Search

Search across all Learn content

← Back to Expressions & POVs

This Tiny Linux Flaw Could Give Hackers Total Control: Meet ‘Copy Fail’

The cybersecurity landscape is once again facing a critical threat as active exploitation of the “Copy Fail” Linux kernel vulnerability has been detected in the wild. This vulnerability, tracked as CVE-2026-31431, allows unprivileged local users to gain root privileges on vulnerable systems, posing

May 5, 20264 min read

The cybersecurity landscape is once again facing a critical threat as active exploitation of the “Copy Fail” Linux kernel vulnerability has been detected in the wild. This vulnerability, tracked as CVE-2026-31431, allows unprivileged local users to gain root privileges on vulnerable systems, posing a significant risk to a wide range of Linux distributions. The urgency of this situation is underscored by CISA’s addition of the flaw to its Known Exploited Vulnerabilities (KEV) Catalog and the subsequent directive for federal agencies to apply patches immediately.

Vulnerability Details

CVE-2026-31431, dubbed “Copy Fail,” resides within the Linux kernel’s algif_aead cryptographic algorithm interface. This flaw enables a local, unprivileged attacker to achieve root privileges by writing four controlled bytes into the page cache of any readable file. The vulnerability affects Linux kernel versions shipped since 2017, making a vast number of systems susceptible to exploitation.

Proof-of-Concept Exploit

At its core, the bug is a logic flaw in the algif_aead / authencesn implementation of the AF_ALG userspace crypto API, introduced as part of an optimization for in-place operations.

Root Cause

The vulnerability stems from incorrect handling of memory during cryptographic operations. Specifically, the kernel allows page-cache-backed memory (including read-only file mappings) to be used as a writable destination buffer during AEAD operations.

Because of this flawed assumption, an attacker can trigger a condition where the kernel performs a controlled write into the page cache of a file that should be immutable. This is not a traditional buffer overflow or race condition, but a deterministic logic bug that reliably enables modification of cached file data.

The key primitives involved are:

  • AF_ALG sockets (userspace interface to kernel crypto)
  • splice() system call, which can pass page-cache references without copying
  • In-place AEAD processing, which incorrectly treats read-only pages as writable

Together, these allow an attacker to redirect writes into sensitive file-backed memory.

Exploitation Primitive: Controlled Page Cache Write

The vulnerability gives attackers a powerful primitive:

“a controlled 4-byte write into the page cache of any readable file”

This is significant because:

  • The write occurs in memory (page cache), not on disk
  • The kernel does not mark the page as dirty, so it is never flushed back
  • File integrity tools that rely on disk checksums remain unaware

This makes the attack both stealthy and reliable.

Privilege Escalation Path

To escalate privileges, the attacker targets a setuid-root binary (e.g., /usr/bin/su). The exploitation flow is:

  1. Open a readable setuid binaryThe attacker does not need write permissions – only read access.
  2. Leverage AF_ALG + splice()Construct a crypto request that causes the kernel to treat page-cache memory as a writable buffer.
  3. Corrupt the binary in memoryUse the 4-byte write primitive to modify critical instructions or data in the cached copy of the binary.
  4. Execute the modified binaryWhen executed, the binary runs with root privileges, but now contains attacker-controlled modifications.

Because the modification exists only in memory, the disk version remains unchanged, further reducing detection.

Reliability and Impact

Unlike many kernel exploits, Copy Fail is notable for its extreme reliability and portability:

  • No race conditions or timing dependencies
  • No need for kernel version–specific offsets
  • Works across virtually all Linux distributions since 2017
  • Exploit code can be as small as ~732 bytes

From a security standpoint, successful exploitation yields:

  • Lateral movement in multi-tenant systems
  • Full root privilege escalation
  • Potential container escape in shared environments

CISA Action and BOD 22-01

In response to the active exploitation, CISA added CVE-2026-31431 to its Known Exploited Vulnerabilities (KEV) Catalog. As mandated by Binding Operational Directive (BOD) 22-01, Federal Civilian Executive Branch (FCEB) agencies are required to patch their Linux endpoints and servers within two weeks, with a deadline of May 15. This directive underscores the severity of the vulnerability and the potential impact on federal systems.

While BOD 22-01 is specifically applicable to U.S. government agencies, CISA has strongly urged all security teams to prioritize patching CVE-2026-31431 to secure their networks against potential attacks.

Mitigation and Recommendations

Given the active exploitation of the “Copy Fail” vulnerability, organizations are advised to take the following steps:

  • Apply Patches: Immediately apply the latest security patches provided by Linux vendors to address CVE-2026-31431.
  • Discontinue Use: If mitigations are unavailable, consider discontinuing the use of the affected product.
  • Monitor Systems: Closely monitor systems for any signs of unauthorized access or privilege escalation.

Tactics, Techniques, and Procedures (TTPs)

The exploitation of the Copy Fail vulnerability aligns with the following MITRE ATT&CK tactic and technique:

  • TA0004 – Privilege Escalation: Exploiting a vulnerability in the Linux kernel to gain elevated privileges.
  • T1068 – Exploitation for Privilege Escalation: Leveraging CVE-2026-31431 to achieve root access from an unprivileged account.

Instantly Fix Risks with Saner Patch Management

Saner patch management is a continuous, automated, and integrated software that instantly fixes risks exploited in the wild. The software supports major operating systems like Windows, Linux, and macOS, as well as 550+ third-party applications.

It also allows you to set up a safe testing area to test patches before deploying them in a primary production environment. Saner patch management additionally supports a patch rollback feature in case of patch failure or a system malfunction.

Experience the fastest and most accurate patching software here.

Featured Posts

Open The Future of Cloud Security Runs Through Containers
The Future of Cloud Security Runs Through Containers

Point of View

The Future of Cloud Security Runs Through Containers

Cloud security is moving closer to the workload. As containers and Kubernetes become standard infrastructure, security programs need to follow applications from build to runtime.

Nov 6, 2026

Open Attack Surface Risk Management: How to Prioritize Exposures
Attack Surface Risk Management: How to Prioritize Exposures

Point of View

Attack Surface Risk Management: How to Prioritize Exposures

Finding exposed assets is only the beginning. See how security teams can rank exposures using threat evidence, reachability, privilege, attack paths, and business context.

Nov 6, 2026

Open What Is an Attack Surface? Types and Examples
What Is an Attack Surface? Types and Examples

Point of View

What Is an Attack Surface? Types and Examples

An attack surface includes the systems, identities, services, interfaces, and physical access points an adversary could use to gain access or reach sensitive resources.

Nov 6, 2026

Open How to Move From Kubernetes Risk Discovery to Risk Reduction
How to Move From Kubernetes Risk Discovery to Risk Reduction

Point of View

How to Move From Kubernetes Risk Discovery to Risk Reduction

Kubernetes security teams can find thousands of misconfigurations, vulnerabilities, and permission issues. Risk reduction depends on knowing which ones matter, fixing the underlying condition, and verifying the result.

Nov 2, 2026