
Proof-of-concept exploit for CVE-2026-31431, a Linux kernel privilege escalation, with x86_64, AArch64, and C payloads to obtain root on affected distributions.
Copy Fail (CVE-2026-31431) PoC and payload examples.
| Distro | Kernel Version |
|---|---|
| Ubuntu 24.04 LTS | 6.17.0-1007-aws |
| Amazon Linux 2023 | 6.18.8-9.213.amzn2023 |
| RHEL 10.1 | 6.12.0-124.45.1.el10_1 |
| SUSE 16 | 6.12.0-160000.9-default |
Run copy_fail_exp.py on an affected Linux distribution to obtain root privileges.
The following steps are used to regenerate the payload files locally for debugging and verification.
payloads/x86_64.asm)Install dependencies:
apt install -y nasm
Compile:
nasm -f bin x86_64.asm -o payload.bin
Inspect the output:
wc -c payload.bin
xxd payload.bin
payloads/aarch64.s)Install dependencies:
apt install -y binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu
Compile:
aarch64-linux-gnu-as aarch64.s -o aarch64.o
aarch64-linux-gnu-objcopy -O binary -j .text aarch64.o aarch64.bin
Inspect the output:
wc -c payload.bin
file payload.bin
xxd payload.bin
payloads/payload.c)Compile:
gcc -Os -s payload.c -o payload.bin
Inspect the output:
wc -c payload.bin
file payload.bin