Introduction
Copy Fail is a local privilege escalation (LPE) vulnerability in the Linux kernel that has been present in every mainstream distribution shipped since 2017. Discovered by Xint Code and publicly disclosed on April 29, 2026, the bug allows any unprivileged local user to gain root access using a 732-byte Python script.
It affects Ubuntu, Debian, RHEL, SUSE, Amazon Linux, Arch, Fedora, and WSL2; anything running an unpatched kernel from the last nine years.
How it Works
The root cause is a 2017 "optimization" in algif_aead.c, part of the kernel's AF_ALG crypto API. That commit made AEAD optimization operate "in-place" by setting req->src = req->dst; both the source and destination of the crypto operation pointed to the same scatterlist.
This becomes exploitable when splice() is involved. When data is passed through this function, the kernel doesn't copy it, instead it passes references to page cache pages, the kernel's cached copy of on-disk files. Because of the in-place design, those page caches ended up chained into the "writable" destination scatterlist.
An attacker can exploit this to write 4 bytes at a time into the page cache of any readable file including the setuid binaries like /usr/bin/su. The write modifies only the in-memory cached copy, not the on-disk file, so the file integrity tool checks will return an okay and won't detect the change. The page cache is also shared across container boundaries, making this a container escape primitive.
To read further in detail, you can visit the original write-up here.
The Fix
The upstream patch a664bf3d603d reverts the in-place optimization entirely. Source and destination are separated:
req->srcnow points to the TX Scatterlist (where splice chains page cache pages)req->dstnow points to the RX Scatterlist (the user's recvmsg buffer)
Page caches are never placed in the writable destination, eliminating the write primitive. As the commit message reads: "There is no benefit in operating in-place in algif_aead since the source and destination come from different mappings."