Breakdown of CVE-2026–31431 (Copy Fail) an Overl00k3d Linux Kernel Vulnerability Enables Privilege Escalation
A performance optimisation in the Linux kernel's AF_ALG AEAD crypto code let a local unprivileged user splice file-backed page cache pages into a crypto socket and have the kernel write controlled bytes into them. By corrupting the in-memory copy of a setuid binary or a file such as the password database, the attacker could gain root without touching the file on disk.
Published on infosecwriteups.com
is a newly discovered Linux kernel flaw (April 2026) that lets any local user corrupt the in memory copy of any readable file (including setuid binaries) and gain root. It lives in the AFALG (user space crypto) subsystem.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the in-place AEAD optimisation assumed the input and output buffers were the same, so page cache pages passed in via splice were reused as a writable output buffer.
Impact
A local user could gain root on any vulnerable kernel, and because the page cache is shared the flaw could also be used to escape a container, while on-disk integrity checks would not notice.
What the attacker needed
Local shell access on the host; vulnerable kernel 4.14 or later; AF_ALG AEAD available
The fix
The optimisation was reverted in a commit, and until patched the advice is to disable the AF_ALG AEAD module or block AF_ALG sockets via seccomp.
How it was found
- Create an AF_ALG AEAD socket, bind it to the chosen algorithm, set the key and accept a crypto file descriptor.
- Choose a root-owned target file and splice data from it into the crypto socket so its page cache pages enter the operation.
- Trigger the crypto operation with recvmsg so the kernel writes a few controlled bytes into the cached pages.
- Repeat with different offsets to build up the desired modification in memory.
- Run the target program so it executes with the injected changes and yields elevated access.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Linux keeps a cached copy of files in memory (the page cache) so reads are fast, and a normal user is only allowed to read root-owned files, not change them. A bug in the kernel's built-in encryption interface (AF_ALG) meant that when a program passed cached file data into an encryption operation, the kernel wrote its output back into that same cached copy. That let an ordinary user quietly alter a privileged program in memory and run it as the administrator (root).
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.