Task 1: Introduction
Most local privilege escalation exploits are fragile. They depend on precise kernel version offsets, require winning a race condition reliably, or crash the system when timing slips. CVE-2026-31431, nicknamed Copy Fail, is none of those things. A 732-byte Python script with no external packages, run by any unprivileged local user, returns a root shell in seconds.
The researcher's own description of the primitive frames it concisely: "an unprivileged local user can write four controlled bytes into the page cache of any readable file on a Linux system, and use that to gain root."
Copy Fail was assigned CVE-2026-31431 and a CVSS v3.1 base score of 7.8 (High). It was reported by Taeyang Lee, a researcher at Theori, who paired his own domain insight into the Linux crypto subsystem with Xint Code, an AI-assisted code analysis tool also developed at Theori, to scan the kernel's crypto codepaths and surface the bug. The full disclosure is published on the Xint research blog. The Linux kernel security team was notified on 23 March 2026, with public disclosure following on 29 April 2026. The vulnerability sat silently in virtually every mainstream Linux distribution for nine years, from a 2017 kernel optimisation through to the April 2026 patch.
If you are familiar with CVE-2022-0847 (Dirty Pipe), the class of primitive that drives Copy Fail will already be familiar. Both exploits write into the in-memory page cache of a file without touching the on-disk content, and both bypass file integrity monitoring as a result. The underlying mechanisms differ. Dirty Pipe used a flaw in the pipe subsystem, whereas Copy Fail abuses the kernel's AF_ALG crypto socket combined with a specific AEAD template. Despite the different entry points, both fall into the same attack surface class of kernel-level page cache writes via splice(). The two are compared below.
| Property | Dirty Pipe (CVE-2022-0847) | Copy Fail (CVE-2026-31431) |
|---|---|---|
| Kernel subsystem | pipe / splice | AF_ALG crypto / splice |
| Write primitive | Arbitrary via pipe flag bug | Controlled 4-byte via authencesn scratch |
| Race condition required | Yes (originally) | No |
| Kernel offsets needed | No | No |
| On-disk file changed | No | No |
| File integrity bypass | Yes | Yes |
The "No" in the race condition row is what makes Copy Fail substantially more reliable as a weapon. A race-based exploit may fail a fifth of the time, demand a retry loop, or hang the system on a bad attempt. The Copy Fail write is deterministic. It either lands cleanly or it errors without side effects. That reliability drove the rapid weaponisation observed after disclosure, with multiple public reimplementations appearing within 24 hours.
Learning Objectives
By the end of this room, you will be able to:
- Explain the page cache write primitive that makes Copy Fail exploitable and why it bypasses file integrity monitoring
- Identify the four kernel components (
page cache,AF_ALG,authencesn,splice) that combine to create the vulnerability - Execute the proof-of-concept as an unprivileged user and obtain a root shell
- Describe the primary detection signals and apply the
modprobemitigation on Ubuntu and Debian systems
Prerequisites
This room assumes comfort with the Linux command line, including basic shell navigation and reading command output, as covered in Linux Fundamentals. It also assumes a working understanding of local privilege escalation concepts as introduced in Linux Privilege Escalation.
Connecting to the Machine
Click the Start Lab Machine button at the top of this task and allow about a minute for it to boot. The room launches an in-browser split-view terminal that is already logged in as the unprivileged user karen, so no further setup is required to follow along. If you prefer to connect from your own terminal over SSH, the credentials are provided in Task 3. Use whichever terminal suits you best for the practical steps in Task 3.
Answer the questions below
I have successfully started my machine.