Copy Fail, CVE-2026-31431: A Page-Cache Write From a Container to Root

If you run shared Kubernetes nodes or CI runners, your image scan has nothing to say about this bug, because it lives in the host kernel. An unprivileged local user on an unpatched kernel can get root, the exploit code is public, and the file it corrupts still passes a hash check.
| Item | Detail |
|---|---|
| Identifier | CVE-2026-31431, named Copy Fail |
| Affected | Linux from 4.14. The CVE record lists each line as unaffected from 5.10.254, 5.15.204, 6.1.170, 6.6.137, 6.12.85, 6.18.22, 6.19.12 and 7.0 |
| Fixed in | Stable 5.10.254, 5.15.204, 6.1.170, 6.6.137, 6.12.85, 6.18.22, 6.19.12. Mainline commit a664bf3d603d, in 7.0-rc7 |
| Severity | CVSS 3.1 7.8 High, scored by the Linux kernel CNA. Red Hat rates it Important |
| Exploited as of 2026-04-30 | Public exploit code since April 29. I found no source dated by April 30 that documents confirmed exploitation in the wild |
| Disclosed | CVE record on 2026-04-22 under a neutral title, named disclosure with proof of concept on 2026-04-29 |
The finders describe a 732-byte Python script and report it working on Ubuntu 24.04, Amazon Linux 2023, RHEL 10.1 and SUSE 16. C and Go ports were public by April 30. Ubuntu rates it priority High: "Trivial local privilege escalation".
Four bytes in the wrong place
The finders' write-up chains three pieces.
- An in-place optimisation. In 2017, commit
72548b093ee3madealgif_aead, the AEAD path of the kernel's AF_ALG crypto socket interface, operate in place. Source and destination became the same scatterlist. - Pages passed by reference.
splice()hands pages to the crypto socket by reference, so the cached pages of a target file, the same ones used by read, mmap and execve, join that list. On decryption the associated data and ciphertext are copied to the output buffer, but the authentication tag's entries are chained in by reference and still point at the file's pages. - Scratch space it does not own. The
authencesntemplate, there for IPsec extended sequence numbers, writes 4 bytes at offsetassoclen + cryptlen, past the legitimate output and into the chained tag pages. It writes before the tag check, so a failed check does not undo anything.
The attacker picks the file, the offset and the 4-byte value, and repeats in 4-byte steps. There is no race, no kernel-specific offset and no valid tag required, and unprivileged users can open AF_ALG sockets by default.
The kernel never marks the page dirty, so the file on disk stays unchanged while the in-memory copy is corrupted. The proof of concept targets the cached copy of a setuid-root binary, /usr/bin/su by default, and runs it for UID 0. The change does not survive a reboot. The root shell is real.
The fix, authored by Herbert Xu and crediting Taeyang Lee of Theori as reporter, goes back to out-of-place operation and copies only the associated data.
The patch was public before the warning
Theori told the kernel security team on March 23. Stable 6.18.22 and 6.19.12 carried the fix by April 11. The CVE record followed on April 22, titled crypto: algif_aead - Revert to operating out-of-place, with no word about security impact. The other long-term lines were tagged on April 30, a day after the exploit went public.
Red Hat rates it Important rather than Critical because it needs local access. That is correct for a single-user box and misleading for a shared node, where every pod and CI job already is local. That gap is why CVSS is not risk.
What to check and do now
- Start with shared nodes. The finders rate Kubernetes clusters, multi-tenant hosts and CI runners as high risk. Add anything running user-supplied code.
- Patch the host kernel to a build containing
a664bf3d603d. Upstream that means 5.10.254, 5.15.204, 6.1.170, 6.6.137, 6.12.85, 6.18.22, 6.19.12 or later. Distribution builds use their own version numbers and were still arriving on April 30, so check Red Hat, Ubuntu or Debian. Reboot or apply a vendor livepatch, because a running kernel keeps the vulnerable code. - Before blocking anything, find AF_ALG users. The finders suggest
lsof | grep AF_ALGorss -xa. They say dm-crypt/LUKS, kTLS, IPsec/XFRM, OpenSSL, GnuTLS and NSS defaults and SSH are unaffected. Software explicitly configured to use AF_ALG can break. - If
algif_aeadis a loadable module, block it. Putinstall algif_aead /bin/falsein a file under/etc/modprobe.d, such asdisable-algif-aead.conf, then runrmmod algif_aead. - If it is built in, use a boot argument. Red Hat says the code cannot be blocklisted on its kernels and lists
initcall_blacklist=algif_aead_init,initcall_blacklist=af_alg_initandinitcall_blacklist=crypto_authenc_esn_module_init, with a warning about possible performance impact. This needs a reboot. - Block AF_ALG with seccomp for untrusted workloads. The finders advise this regardless of patch state. Validate first against crypto, VPN and storage workloads.
- Shrink local access while unpatched. Red Hat's examples are disabling SSH, keeping SELinux enforcing, using default Security Context Constraints, running workloads as non-root and restricting
oc debugto trusted administrators. Closing one path leaves the others open. - Do not treat clean integrity checks as clearance. File hashes and package verification read the disk, and the disk did not change. A reboot also clears the modified page, so a clean result afterwards is weak evidence. I found no published indicators of compromise on copy.fail or in Red Hat's bulletin. My inference from the exploit path, not a published indicator: audit an unprivileged process opening AF_ALG sockets (family 38) with repeated
sendmsgandsplicecalls against a setuid binary, followed by an unexpected UID 0 shell.
A clean image does not mean a safe node
An image scan answers what is in the image. The kernel is not in the image. Containers share the host's kernel, and the finders say the page cache is shared "across all processes on a system, including across container boundaries". Ubuntu's description also allows for a container escape.
One limit: the finders assert the shared page cache but have not yet published their own container escape. A third-party Kubernetes proof of concept appeared on GitHub on April 30, claiming node-level code execution from an unprivileged container through an image layer shared with kube-proxy. I have not verified it and am not linking to it. My position is to treat this as a tenant boundary break anyway. A write into memory that every workload on the node reads should not wait for confirmation.
This is why scanning alone is not a security program. Your images can all pass while the node underneath is the vulnerable part.
Take one cluster today and list every node's running kernel build against the fixed versions above. For each miss, write down who can run code on that node. That second column sets your patch order.
References
- CVE.org (Linux kernel CNA), CVE-2026-31431 record, 2026-04-22
- NVD, CVE-2026-31431, 2026-04-22
- Theori (Xint Code), Copy Fail disclosure page, 2026-04-29
- Xint / Theori, Copy Fail write-up: Linux distributions, 2026-04-29
- oss-security (Jan Schaumann), CVE-2026-31431: CopyFail: linux local privilege scalation, 2026-04-29
- oss-security (Roman Medina-Heigl Hernandez), Re: CVE-2026-31431: CopyFail: linux local privilege scalation, 2026-04-30
- kernel.org, ChangeLog-6.18.22, 2026-04-11
- kernel.org, ChangeLog-6.12.85, 2026-04-30
- Red Hat, RHSB-2026-002: Copy Fail, 2026-04-30
- Red Hat, CVE-2026-31431, 2026-04-30
- Ubuntu Security, CVE-2026-31431, 2026-04-22
- Debian Security Tracker, CVE-2026-31431, 2026-04-29
