
Python proof-of-concept for CVE-2026-31431 (Copy Fail), a Linux kernel local privilege escalation via AF_ALG socket and splice() memory corruption, yielding root.
This repository contains a PoC (Proof of Concept) for the vulnerability CVE-2026-31431, known as Copy Fail, which affects the Linux kernel. It is a local privilege escalation flaw that allows a standard user to obtain root privileges by exploiting improper memory buffer handling during operations combining AF_ALG sockets and the splice() system call.
splice().The script was tested and validated on the following environments, under default configurations with no patches applied:
| Distribution / OS | Kernel version | Status |
|---|---|---|
| Ubuntu 24.04 LTS | 6.17.0-1007-aws | Vulnerable / Working |
| Amazon Linux 2023 | 6.18.8-9.213.amzn2023 | Vulnerable / Working |
| RHEL 10.1 | 6.12.0-124.45.1.el10_1 | Vulnerable / Working |
| SUSE 16 | 6.12.0-160000.9-default | Vulnerable / Working |
| Kali Linux (WSL2) | 6.6.87.2-microsoft-standard-WSL2 | Working (virtualized environment) |
(Note: The tests on Kali Linux were performed in a WSL2 (Windows Subsystem for Linux) environment. Since WSL2 kernels are modified by Microsoft, behavior may differ from a native kernel. As kernel 6.6.87 is an LTS branch, Microsoft may have backported the security fix. Make sure the privilege escalation is genuine before validating this test.)
python3 exploit.py