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
CVE-2026-31431 — Documentation and analysis of a local privilege escalation vulnerability in the Linux kernel's authencesn template via AF_ALG and splice(), including affected versions, detection, and mitigation. | Kitploit
Tools/GitHubGitHub/xd20111/cve-2026-31431
Privilege EscalationExploit FrameworksVulnerability AnalysisExploitation
GitHubxd20111/cve-2026-31431

CVE-2026-31431

Documentation and analysis of a local privilege escalation vulnerability in the Linux kernel's authencesn template via AF_ALG and splice(), including affected versions, detection, and mitigation.

View Repository
786 months agoNot yet reviewed
Share

CVE-2026-31431 — Copy Fail

Local Privilege Escalation in the Linux kernel's authencesn cryptographic template via AF_ALG + splice().
Disclosed April 29, 2026 by Theori (Xint Code).


Overview

FieldDetail
CVECVE-2026-31431
NicknameCopy Fail
CVSS7.8 HIGH
TypeLocal Privilege Escalation (LPE)
IntroducedLinux kernel 4.14 (2017, commit 72548b093ee3)
FixedMainline commit a664bf3d603d
RequiresLocal unprivileged shell access
Remote vectorNone — local only

Vulnerability Summary

A logic flaw in the kernel's authencesn AEAD wrapper allows an unprivileged local user to perform a deterministic, controlled 4-byte write into the page cache of any readable file on the system — including setuid binaries such as /usr/bin/su.

The root cause is a 2017 in-place processing optimization that placed page cache pages into a writable scatterlist. The authencesn algorithm writes 4 bytes of scratch data outside its intended output region during Extended Sequence Number rearrangement. Because of the scatterlist structure introduced by the optimization, those 4 bytes land in the page cache of a file fed via splice() — bypassing file permissions entirely.

No race condition. No retries. No crash risk. Deterministic across all tested distributions.

Comparison to Prior Art

Dirty Cow (2016)Dirty Pipe (2022)Copy Fail (2026)
Race condition requiredYesPartialNo
Version-specificYesYesNo
ReliabilityFlakyModerateDeterministic
Distro coverageLimitedLimitedAll since 2017

Affected Versions

Vulnerable: Linux kernel 4.14 through 6.18.21 and 6.19.x before 6.19.12.

All major distributions shipping kernels in this range are affected, including:

DistroTested Version
Ubuntu 24.04 LTS6.17.0-1007-aws
Amazon Linux 20236.18.8-9.213.amzn2023
RHEL 10.16.12.0-124.45.1.el10_1
SUSE 166.12.0-160000.9-default

Not affected: Ubuntu 26.04 (Resolute) and later.


Mitigation

Option 1 — Patch (Recommended)

Update to a kernel containing mainline commit a664bf3d603d, which reverts the 2017 in-place optimization.

# Ubuntu / Debian
sudo apt update && sudo apt upgrade -y && sudo reboot

# RHEL / AlmaLinux / Amazon Linux
sudo dnf clean metadata && sudo dnf upgrade && sudo reboot

# SUSE
sudo zypper refresh && sudo zypper update kernel-default && sudo reboot

Option 2 — Disable algif_aead (Temporary)

If patching immediately is not possible, disable the vulnerable module to close the attack surface.

Note for RHEL-family systems: algif_aead is built into the kernel on RHEL/AlmaLinux/CentOS (CONFIG_CRYPTO_USER_API_AEAD=y). The modprobe.d workaround does not work on these systems. Use the initcall_blacklist method instead.

Debian/Ubuntu (module is loadable):

echo "install algif_aead /bin/false" | sudo tee /etc/modprobe.d/disable-algif.conf
sudo rmmod algif_aead 2>/dev/null || true

RHEL-family (built-in kernel — requires reboot):

sudo grubby --update-kernel=ALL --args="initcall_blacklist=algif_aead_init"
sudo reboot

Confirm after reboot:

grep initcall_blacklist /proc/cmdline

What This Workaround Affects

ComponentImpact
dm-crypt / LUKS✅ Not affected
SSH✅ Not affected
IPsec / XFRM✅ Not affected
kTLS / in-kernel TLS✅ Not affected
OpenSSL / GnuTLS / NSS (default builds)✅ Not affected
OpenSSL with afalg engine explicitly enabled⚠️ Falls back to userspace crypto
Applications binding aead/skcipher/hash AF_ALG sockets directly⚠️ Will break — check with lsof | grep AF_ALG

Option 3 — seccomp (Defense-in-Depth)

For untrusted workloads — containers, CI runners, sandboxed environments — block AF_ALG socket creation via seccomp policy regardless of patch state. This limits the attack surface even on vulnerable kernels.


Detection

Check if algif_aead is currently loaded or in use:

# Check if module is loaded
lsmod | grep algif_aead

# Check if any process has an AF_ALG socket open
lsof | grep AF_ALG
ss -xa | grep alg

Runtime detection signatures are available in Sysdig Secure (rule: AF_ALG Page Cache Poisoning Leading to Privilege Escalation).


References

ResourceLink
NVD Entryhttps://nvd.nist.gov/vuln/detail/CVE-2026-31431
Theori Full Writeuphttps://xint.io/blog/copy-fail-linux-distributions
Copy Fail Sitehttps://copy.fail
CERT-EU Advisoryhttps://cert.europa.eu/publications/security-advisories/2026-005/
Sysdig Analysishttps://sysdig.com/blog/cve-2026-31431-copy-fail-linux-kernel-flaw-lets-local-users-gain-root-in-seconds
The Register Coveragehttps://theregister.com/2026/04/30/linux_cryptographic_code_flaw/
AlmaLinux Patch Noteshttps://almalinux.org/blog/2026-05-01-cve-2026-31431-copy-fail/
CloudLinux KernelCarehttps://blog.cloudlinux.com/cve-2026-31431-copy-fail-kernel-update

Disclosure Timeline

DateEvent
2017Regression introduced via commit 72548b093ee3
Early April 2026Upstream fix merged (commit a664bf3d603d)
April 29, 2026Public disclosure by Theori / Xint Code
April 30, 2026Distribution patches begin shipping
May 1, 2026AlmaLinux patched kernels in production repos

Author

xD The Watcher — Red Teamer, Ethical Hacker & AI Security Researcher
GitHub: @xd20111
Blog: yourhacker


Notes

This repository documents the vulnerability for research and defensive purposes. For the authoritative technical writeup and official PoC, refer to Theori's disclosure linked above.

If your threat model includes shared-kernel multi-tenancy — containers on a shared host, CI runners, build farms — the isolation boundary is now meaningfully weaker until patched. Hardware or VM-level isolation is the correct response, not namespace boundaries.

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.

    614
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    476
  • 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.

    389
  • 4

    redforge

    cybersecurity91/redforge

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

    334
  • 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.

    257
  • 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 →