Copy Fail (CVE-2026–31431) Vulnerability: Architectural Flaws i
A 2015 out-of-bounds write in the Linux kernel's authencesn module was combined with a 2017 in-place optimisation that merged source and destination buffers, allowing the write to corrupt the page cache. An unprivileged local user could then modify read-only system files in memory, such as /etc/passwd or setuid binaries, to gain root privileges.
Published on enesbuyuk.medium.com
In this comprehensive deep-dive, we will dissect the Linux Kernel “Copy Fail” vulnerability (CVE-2026–31431) [1], providing a rigorous technical analysis of its underlying mechanics, exploitation vectors, and robust mitigation strategies.
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 2015 authencesn out-of-bounds write was made exploitable by the 2017 in-place optimisation that set the destination buffer equal to the source buffer, causing the write to land in page cache pages.
Impact
Any unprivileged local user could reliably achieve root access by manipulating read-only system files in memory, bypassing disk-based integrity checks.
What the attacker needed
Local unprivileged access; vulnerable kernel (4.14 to 6.16.x)
The fix
The kernel was fixed by reverting the AF_ALG AEAD implementation to an out-of-place operation model, and a temporary workaround is to block AF_ALG socket creation or blacklist the algif_aead module.
How it was found
- Clone the copy-fail-c repository and build it with make.
- Run the ./vulnerable checker to see if the system is susceptible.
- Run ./exploit with the path to a setuid binary to inject a payload into its page cache copy.
- Execute the targeted setuid binary to obtain a root shell.
- Alternatively, run ./exploit-passwd to change the UID field in the page cache copy of /etc/passwd to 0000.
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.
The Linux kernel has a bug where a small write goes slightly past the intended memory area. A later performance change made that area overlap with the cache of files kept in memory, so the stray write could alter files like /etc/passwd without touching the disk. Any normal user on the machine could then become 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.