CVE-2026-31431
YouTube Script + Technical Reference
The Demo
Hook the audience immediately — no context, straight to the impact.
HOOK 0:00 – 0:45
[VISUAL: Terminal. User prompt shows uid=1001(xint). No special tools visible.]

This is a regular Linux server. No root access. No special privileges. The user you're looking at is uid 1001 — a totally normal account.

Watch what happens when I run a single Python script. 732 bytes. Standard library only. No compilation. No binary payloads.

[VISUAL: Run the script. Pause for effect. Root shell appears.]

That's a root shell. From an unprivileged user. On Ubuntu 24.04. The same script — no changes — also works on Amazon Linux, RHEL, and SUSE.

This is Copy Fail. CVE-2026-31431. A bug that lived silently in the Linux kernel for nine years.

INTRODUCE 0:45 – 1:30
[VISUAL: Title card with CVE number. Channel art. Stats.]

Today we're doing a complete technical breakdown. We'll cover the kernel internals that made this possible, the exact sequence of commits that accidentally created the vulnerability, and why standard file integrity tools would have completely missed it — because this bug doesn't touch the disk at all.

There's a lot of depth here. Grab a coffee. By the end, you'll understand AF_ALG sockets, the Linux page cache, cryptographic scatterlists, and one of the most elegant — and terrifying — exploit chains in recent kernel history.

Let's go.

Kernel Internals Deep-Dive
Key concepts, syscalls, and data structures for the script's technical segments.
AF_ALG Socket Lifecycle
AF_ALG setup (no root required): socket(AF_ALG=38, SOCK_SEQPACKET, 0)fd: abind(a, {.salg_type="aead", .salg_name="authencesn(hmac(sha256),cbc(aes))"})setsockopt(a, SOL_ALG, ALG_SET_KEY, key, keylen)accept(a)fd: u (request socket)sendmsg(u, AAD + ciphertext, cmsg[assoclen, iv, op=DECRYPT])TX SGL built splice(file, pipe) then splice(pipe, u)page cache refs in TX SGLrecv(u)triggers in-place AEAD decrypt → scratch write → PAGE CACHE CORRUPT
Key Kernel Functions in the Call Chain
algif_aead_recvmsg() — entry point; sets up in-place scatterlist, calls aead_request_set_crypt()
sg_chain() — links auth tag pages from TX SGL onto the end of RX SGL
crypto_authenc_esn_decrypt() — the authencesn algorithm entry; calls scatterwalk_map_and_copy() 3 times
scatterwalk_map_and_copy(tmp+1, dst, assoclen+cryptlen, 4, 1) — the out-of-bounds write; maps page cache page via kmap_local_page() and writes directly
crypto_authenc_esn_decrypt_tail() — reads seqno_lo back but never restores original bytes; HMAC fails; error returned
Why File Integrity Monitoring Misses This
Normal write path (detected by FIM): write() → VFS → mark page dirty → writeback → on-disk file changes sha256sum changes ← FIM detects Copy Fail write path (NOT detected): authencesn scratch → kmap_local_page() → write directly to page cache memory page NEVER marked dirty writeback NEVER triggered on-disk file UNCHANGED sha256sum UNCHANGED ← FIM sees nothing But execve() reads from page cache, not disk. Shellcode in page cache → runs as uid 0 when su is executed.
From Discovery to Patch
2011
bug root introduced
2017
became exploitable
~1hr
AI scan to find it
37d
report to patch
Coordinated Disclosure
2026-03-23
Vulnerability reported to Linux kernel security team
2026-03-24
Initial acknowledgment received
2026-03-25
Patches proposed and reviewed
2026-04-01
Patch committed to mainline kernel (commit a664bf3d603d)
Reverts algif_aead.c to out-of-place operation
2026-04-22
CVE-2026-31431 assigned
2026-04-29
Public disclosure — xint.io blog post, GitHub PoC, copy.fail site
Key Links for Video Description
🔗
Original blog post: xint.io/blog/copy-fail-linux-distributions
🔗
Project site: copy.fail
🔗
PoC repo: github.com/theori-io/copy-fail-CVE-2026-31431
🔗
Kernel fix: github.com/torvalds/linux/commit/a664bf3d603d
🔗
Vulnerable commit: github.com/torvalds/linux/commit/72548b093ee3