Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-31431-Copy-Fail-R-pertoire-de-Pr-vention — Defensive research repository for CVE-2026-31431, a Linux kernel local privilege escalation via page cache corruption through AF_ALG, splice(), and authencesn. Includes technical analysis, detection strategies, and mitigation measures. | Kitploit
Tools/GitHubGitHub/maxime288/cve-2026-31431-copy-fail-r-pertoire-de-pr-vention
Privilege EscalationVulnerability AnalysisExploitationLearning & EducationCurated ResourcesBinary ExploitationLabs & Practice
GitHubmaxime288/cve-2026-31431-copy-fail-r-pertoire-de-pr-vention

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-31431-Copy-Fail-R-pertoire-de-Pr-vention

Defensive research repository for CVE-2026-31431, a Linux kernel local privilege escalation via page cache corruption through AF_ALG, splice(), and authencesn. Includes technical analysis, detection strategies, and mitigation measures.

View Repository
33 months agoNot yet reviewed

🔴 CVE-2026-31431 — Copy Fail

Linux Kernel Local Privilege Escalation (LPE) — Defensive Research Repository


📖 Overview

Copy Fail (CVE-2026-31431) is a Local Privilege Escalation (LPE) vulnerability affecting the Linux kernel via controlled corruption of the page cache through the AF_ALG, splice() and authencesn mechanisms.

This repository aims to:

  • document the internal mechanism of the vulnerability,
  • explain the logical exploitation chain,
  • present defensive impacts,
  • propose detection strategies,
  • provide mitigation measures,
  • raise awareness about Linux kernel security.

⚠️ This project is strictly educational, defensive, and intended for security research.


📑 Table of Contents

  • Overview
  • Vulnerability Mechanism
  • Attack Surface
  • Lab Demonstration
  • Detection & IOCs
  • Mitigations
  • Timeline
  • References
  • Legal Notice

🧪 Research Framework

All demonstrations presented in this repository were carried out in isolated, controlled laboratory environments.

No use on third-party systems without explicit permission is allowed.


🔍 Overview


🧠 Why This Vulnerability Matters

CharacteristicDetail
No race conditionDeterministic exploitation
No disk modificationDifficult detection

Comparable to:

  • Dirty Cow (CVE-2016-5195)
  • Dirty Pipe (CVE-2022-0847)
  • Modern Page Cache Corruption Primitives

🧬 Simplified Chain View

root@kitploit:~
User Space
    ↓
AF_ALG Socket
    ↓
splice()
    ↓
Page Cache Reference
    ↓
authencesn In-Place Write
    ↓
Controlled 4-Byte Overwrite
    ↓
execve()
    ↓
Privilege Escalation

⚙️ Vulnerability Mechanism

Technical Timeline

root@kitploit:~
2011 → authencesn added to kernel
2015 → AF_ALG gets AEAD + splice() support
2017 → In-place optimization in algif_aead.c
2026 → Discovery and official patch

🔩 Involved Components

AF_ALG

Socket interface exposing cryptographic primitives of the Linux kernel to userspace.

splice()

Mechanism allowing page transfer without copy between file descriptors.

authencesn

AEAD IPsec ESN template using the destination buffer as temporary workspace.


🧨 Root Cause

The optimization introduced in algif_aead.c allowed direct chaining of page cache pages into the destination scatterlist via sg_chain().

root@kitploit:~
Input SGL:   AAD || Ciphertext || Tag (page cache)
                                     ↑
Output SGL:  AAD || Ciphertext ------+

authencesn then writes directly into the page cache pages of the target file.


🎯 Attack Surface

PrimitiveControl
Target fileAny readable file
Offset

🖥️ Affected Systems


🧪 Demonstration (Lab Only)

⚠️ Reserved for isolated test environments.

Pre-checks

root@kitploit:~
uname -r
lsmod | grep algif_aead
python3 --version

Cloning the PoC

root@kitploit:~
git clone https://github.com/theori-io/copy-fail-CVE-2026-31431.git
cd copy-fail-CVE-2026-31431

Execution

root@kitploit:~
python3 copy_fail_exp.py

🛡️ Detection & IOCs

Auditd

root@kitploit:~
auditctl -a always,exit -F arch=b64 -S socket -F a0=38 -k af_alg_socket
auditctl -a always,exit -F arch=b64 -S splice -k splice_monitor

Behavioral Detection

root@kitploit:~
ps aux | awk '$1 == "root"'
ss -tlnp

Defensive Monitoring

  • eBPF monitoring
  • Falco
  • Wazuh
  • EDR memory inspection
  • Page-cache anomaly detection

🛡️ Mitigation

Disable algif_aead

root@kitploit:~
echo "install algif_aead /bin/false" | sudo tee /etc/modprobe.d/disable-algif-aead.conf
sudo rmmod algif_aead

Seccomp Restriction

root@kitploit:~
{
  "defaultAction": "SCMP_ACT_ALLOW",
  "syscalls": [
    {
      "names": ["socket"],
      "action": "SCMP_ACT_ERRNO",
      "args": [
        { "index": 0, "value": 38, "op": "SCMP_CMP_EQ" }
      ]
    }
  ]
}

✅ Official Patch

The patch a664bf3d603d removes the vulnerable in-place operation in algif_aead.c.

root@kitploit:~
sudo apt update && sudo apt upgrade
sudo reboot

📅 Timeline

DateEvent
2017Vulnerability introduced
2026-03-23Reported to kernel security team
2026-04-01Patch integrated
2026-04-29Public disclosure

🔗 References



📈 SEO / Keywords

linux kernel security, CVE-2026-31431, copy fail, page cache, AF_ALG, authencesn, linux LPE, kernel exploit, linux hardening, security research, dirty pipe, kernel mitigation


⚖️ Legal Notice

This repository is intended exclusively for:

  • defensive research,
  • authorized laboratories,
  • cybersecurity education,
  • Linux security analysis.

Any unauthorized use is illegal.


👤 Credits

Original Research

  • theori.io
  • Linux security research community

French-language Project

  • @Maxime288

⭐ Support Linux Kernel Security Research

🛡️ Awareness • Mitigation • Defensive Research
🔁 Share the project with the cybersecurity community
⭐ Support Linux security research


Download Tool
ElementValue
TypeLocal Privilege Escalation
ImpactLocal root
ComponentLinux Kernel
SubsystemAF_ALG / authencesn
PrimitiveControlled write into page cache
ConditionNon-privileged user
StealthDisk file intact
SeverityCritical
Minimalist exploitPython standard only
Container impactKubernetes / VPS / shared hosting
Wide windowVulnerable kernels since 2017
Controlled via splice
Written valueseqno_lo field
PersistenceMemory only
Disk detectionImpossible
DistributionKernelStatus
Ubuntu 24.04 LTS6.17.0-1007-aws✅ Vulnerable
Amazon Linux 20236.18.8-9.213✅ Vulnerable
RHEL 10.16.12.0✅ Vulnerable
SUSE 166.12.0✅ Vulnerable
ResourceDescription
Dirty PipeCVE-2022-0847
Linux Kernel DocsOfficial documentation
Openwall SecuritySecurity mailing list
LWN.netLinux kernel analysis
AF_ALG DocumentationCrypto API
XFRM / IPsecAffected subsystem