HeadlinesBriefing favicon HeadlinesBriefing.com

Linux Kernel Vulnerability 'Copy Fail' Enables Root Access via 732-Byte Script

Hacker News •
×

A critical Linux kernel flaw, CVE-2026-31431, allows unprivileged users to escalate privileges to root using a 732-byte Python script. The bug, dubbed *Copy Fail*, exploits a logic error in the authencesn cryptographic template, enabling a deterministic 4-byte write to the page cache of any readable file. This corruption affects distributions like Ubuntu, Amazon Linux, RHEL, and SUSE, bypassing standard security checks. The exploit leverages the AF_ALG socket and splice() system call to manipulate page cache entries without triggering writeback mechanisms, leaving on-disk files intact but in-memory copies compromised. A single script can modify setuid binaries, granting root access across containers and Kubernetes nodes.

The vulnerability stems from authencesn's use of a destination buffer as scratch space during decryption, writing beyond its allocated memory into adjacent page cache pages. Unlike prior flaws like Dirty Cow or Dirty Pipe, Copy Fail requires no race conditions, retries, or version-specific timing. Its portability and simplicity—requiring only Python 3.10+ and standard libraries—make it uniquely dangerous. The attack chain involves AF_ALG's in-place operations, where the authentication tag's page cache reference is inadvertently modified, bypassing VFS write protections. This allows attackers to alter critical system binaries undetected, as file integrity tools only check on-disk data, not the corrupted in-memory state.

The exploit's stealth and cross-container impact raise alarms for cloud environments. Since page caches are shared across processes, a compromised container can escalate to the host kernel, undermining isolation guarantees. Researchers note no patches exist yet, though the disclosure timeline suggests coordinated remediation. The finding highlights risks in kernel subsystems handling cryptographic operations, where even minor logic errors can have catastrophic consequences. The 732-byte payload's effectiveness underscores the need for stricter memory boundary enforcement in low-level APIs.

Copy Fail exemplifies how subtle design flaws in cryptographic templates can lead to systemic vulnerabilities. Its simplicity and portability make it a priority for security teams, as it bypasses traditional defenses like file checksums and container sandboxes. The discovery, AI-assisted but rooted in Taeyang Lee's research, reveals gaps in kernel security practices. As part of a two-part series, Part 2 will detail container escape techniques, further emphasizing the threat's scale. Immediate patching is critical to prevent exploitation in production systems.