Security & Infrastructure Tools
New Linux Copy Fail flaw gives hackers root on major distros
A new Linux local privilege escalation called Copy Fail (CVE-2026-31431) lets an unprivileged user gain root by performing a 4-byte write into the page cache via the AF_ALG crypto interface and splice(), affecting kernels back to 2017. The exploit has been demonstrated on Ubuntu 24.04 LTS, Amazon Linux 2023, RHEL 10.1, and SUSE 16; upstream fixes were released on April 1, 2026, with distributions racing to push patches. Interim mitigations include disabling the AF_ALG interface or the algif_aead module, and promptly patching multi-tenant environments.

NEW LINUX ‘COPY FAIL’ FLAW GIVES HACKERS ROOT ON MAJOR DISTROS
OverviewA local privilege escalation vulnerability, known as Copy Fail, has been disclosed for Linux kernels released since 2017. Tracked as CVE-2026-31431, the flaw enables an unprivileged user to gain root privileges by exploiting a logic bug in the kernel’s handling of cryptographic operations. The vulnerability was identified by Theori, an offensive security company, using its AI-driven pentesting platform Xint Code, and was reported to the Linux kernel security team on March 23. Patch work began quickly, and fixes appeared upstream within a week. Public technical details, including a proof-of-concept exploit, emerged shortly thereafter.
What Copy Fail Is And How It Arises
- Core issue: Copy Fail stems from a logic error in the Linux kernel’s in-place optimization of the crypto path. Introduced in 2017, this optimization began reusing the same buffer for input and output rather than keeping them strictly separate.
- How an attacker uses it: By leveraging the AF_ALG socket-based interface—which exposes kernel crypto functions to user space—and the splice() system call, an authenticated user can perform a controlled four-byte write into the page cache of a readable file. If those bytes land in the memory region used by a setuid-root binary, the behavior of that binary can be altered when executed, potentially granting root access.
- Scope of the write: The four-byte write targets the page cache of a file, not a normal user-space buffer, which is what makes the vulnerability particularly dangerous.
Dissection of the Technical Details
- AFALG and splice: AFALG provides a gateway from user space to kernel crypto routines. When combined with splice(), this channel can be exploited to write into the page cache in ways that bypass normal protections.
- The four-byte window: The attack relies on a small, targeted write that, under certain conditions, can influence how a setuid-root binary executes.
- The time horizon of risk: The bug was introduced with the 2017 in-place optimization and has persisted through a broad swath of kernels up to 2026. This means many distributions with kernel versions spanning 2017–2026 could be affected if they have not applied the upstream fix.
Impact Across Distributions
- Demonstrated at scale: The researchers claim a 100% reliable PoC that can yield root on several major Linux distributions. The PoC was validated against Ubuntu 24.04 LTS, Amazon Linux 2023, Red Hat Enterprise Linux 10.1, and SUSE Linux Enterprise Server 16.
- Real-world implications: Because the vulnerability affects a wide range of kernel versions and because the write targets common crypto paths used by many systems, the attack surface is broad. The exploit’s portability and simplicity—using a single script across multiple distros—heighten the urgency for patching.
Patch Status and Fixes
- Upstream patch: The issue was fixed upstream on April 1, 2026, by reverting the problematic in-place crypto behavior that was introduced in the 2017 update to the kernel’s crypto path. The fix is tied to kernel series updates, including versions 6.18.22, 6.19.12, and 7.0.
- Distribution responses: Major Linux distributions have begun pushing kernel updates to address CVE-2026-31431. However, at the time of reporting, some distributions had not issued formal advisories or acknowledgments for the CVE, even when updates were available in newer releases.
- Notable nuances: While Fedora 42 and newer have received updates, there were gaps in official advisories or explicit CVE acknowledgments documented publicly. This has implications for system administrators who rely on formal vulnerability notices to drive patching workflows.
Interim and Practical Mitigations (High-Level)
- Conceptual mitigation: In environments where updates are not yet deployed, researchers suggest reducing the attack surface by disabling the interface that enables the exploit (the AF_ALG crypto pathway) or by disabling the specific crypto module implicated in the vulnerability.
- Policy and risk considerations: Given the multi-tenant nature of many Linux deployments—such as Kubernetes clusters, CI/CD runners, build farms, and cloud-based services that run user code—these environments may warrant prioritized patching and tightening of crypto interfaces as part of a broader hardening effort.
- Important caveat: Any interim measures should be evaluated against system requirements and security needs. The exact commands or steps to implement mitigations are not provided here, but the general approach involves restricting or disabling the affected crypto pathway until kernel patches are applied.
Contextual Notes and Related Context
- Comparative framing: Copy Fail has been described as being closer to the Dirty Pipe vulnerability in terms of impact scope and reliability, while offering a broader cross-distro reach due to its reliance on a fundamental crypto path optimization.
- Public disclosures and outreach: Technical write-ups, including the Xint Code analysis, outline the mechanism and rationale behind the exploit and detail the conditions under which root access can be obtained.
- Ongoing monitoring: Analysts emphasize prioritizing patch deployment across both single-host and multi-tenant Linux environments and keeping an eye on kernel release notes and security advisories as distributions continue to roll out fixes.
Visual and Supplemental Notes
- Visual references within the discourse include an image illustrating root access demonstrations on the four affected distributions, as well as repository and blog links that delve into the technical specifics of Copy Fail and its PoC.
- Cross-referenced material includes related security topics such as additional local privilege escalation vulnerabilities and other Linux kernel security discussions, illustrating the evolving landscape of kernel-level exploits and mitigations.
Broader Implications for Linux Security
- The Copy Fail incident underscores the fragility that can accompany performance optimizations in critical subsystems. A seemingly minor in-place optimization introduced years earlier can create a stealthy pathway for privilege escalation when combined with user-space interfaces that expose kernel capabilities.
- The episode also highlights the importance of rapid coordination between researchers, kernel maintainers, and downstream distributions. The ability to move from discovery to upstream fix within days is a positive signal, even as the patching cadence across diverse environments may lag in practice.
- For administrators and security teams, the episode reinforces the need for proactive vulnerability management that accounts for kernel-level risks, cross-distro patch compatibility, and the management of multi-tenant environments where untrusted code can indirectly influence system behavior.
Closing PerspectiveCopy Fail represents a consequential reminder that privilege-escalation flaws can emerge from optimization choices made years earlier. While upstream fixes have been deployed and patches are rolling out across major distributions, the practical reality is ongoing patch management across complex, heterogeneous Linux deployments. As with many kernel vulnerabilities, the path from discovery to full remediation is as much about coordinated deployment and governance as it is about the technical exploit itself. Administrators and users alike should stay informed about kernel updates and advisories and plan patching strategies accordingly to minimize exposure to this class of threat.