
CVE-2026-31431 - Copy Fail - PoC exploit
This vulnerability allows an unprivileged local attacker to gain root privileges on a vulnerable Linux system.
This code is provided for educational and security research purposes only.
It demonstrates a hypothetical vulnerability (CVE-2026-31431) in the Linux kernel's AF_ALG socket interface.
Do not run this on any system you do not own or have explicit written permission to test.
Misuse of this code may violate laws and regulations.
CVE-2026-31431 (disclosed 2026) is a copy-on-write / length confusion bug in the authencesn(hmac(sha256),cbc(aes)) AEAD implementation.
By crafting specific sendmsg() control messages with zero-length buffers, an attacker can trigger a kernel splice() operation to overwrite adjacent memory pages – leading to arbitrary file corruption.
This PoC targets /usr/bin/su to modify its binary payload in 4‑byte chunks, then executes it to demonstrate privilege escalation.
AF_ALG, SOL_ALG socket optionssplice() + sendmsg() for zero‑copy data transfer