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-checker — Shell scanner for CVE-2026-31431 "Copy Fail" — a local privilege escalation via Linux kernel page cache corruption (algif_aead/AF_ALG). Checks kernel version, patch status, module state, setuid exposure and mitigations. Supports Debian 11–13 and Ubuntu 20.04–25.10. CI/CD-ready (exit codes + JSON output). | Kitploit
Tools/GitHubGitHub/gubiczap/cve-2026-31431-checker
Privilege EscalationVulnerability ScannersVulnerability AnalysisExploitationConfiguration AuditingDevSecOpsThreat IntelligenceIncident Response

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →

About

Shell scanner for CVE-2026-31431 "Copy Fail" — a local privilege escalation via Linux kernel page cache corruption (algif_aead/AF_ALG). Checks kernel version, patch status, module state, setuid exposure and mitigations. Supports Debian 11–13 and Ubuntu 20.04–25.10. CI/CD-ready (exit codes + JSON output).

GitHub
gubiczap/cve-2026-31431-checker

cve-2026-31431-checker

View Repository
13 months agoNot yet reviewed
Share

CVE-2026-31431 "Copy Fail" — Vulnerability Detection Script

Shell-based scanner for CVE-2026-31431 "Copy Fail", a local privilege escalation vulnerability in the Linux kernel's cryptographic subsystem (algif_aead / AF_ALG interface). An unprivileged local user can write 4 bytes into the in-memory page cache of a setuid binary (e.g. /usr/bin/su) and obtain a root shell — without touching the on-disk file.

  • CVSS: 7.8 (HIGH)
  • Present in kernel since: 2017 (4.14)
  • Upstream fix commit: a664bf3d603d
  • CISA KEV: added 1 May 2026
  • More info: copy.fail

Supported distributions

DistributionReleasePatched version
Debian11 Bullseye5.10.251-3
Debian12 Bookworm6.1.170-1
Debian13 Trixie6.12.85-1
DebianSid / Forky6.19.14-1
Ubuntu20.04 LTS Focal (GA)5.4.0-220.240
Ubuntu20.04 LTS Focal (HWE)5.15.0-135.145~20.04.1
Ubuntu22.04 LTS Jammy (GA)5.15.0-135.145
Ubuntu22.04 LTS Jammy (HWE)6.8.0-61.63~22.04.1
Ubuntu24.04 LTS Noble6.8.0-61.63
Ubuntu24.10 Oracular6.11.0-27.27
Ubuntu25.04 Plucky6.14.0-15.15
Ubuntu25.10 Questingmainline fix (≥ 6.15)
Genericanymainline range check (4.14 – 6.14 vulnerable)

Ubuntu derivatives based on the above releases (Pop!_OS, Linux Mint, Elementary OS, etc.) are also detected via ID_LIKE in /etc/os-release.


What it checks


Usage

root@kitploit:~
# Basic scan
bash cve-2026-31431-detect.sh

# No colour output (log files, CI)
bash cve-2026-31431-detect.sh --no-colour

# JSON output (machine-readable, for pipelines)
bash cve-2026-31431-detect.sh --json

# Quiet mode — only print the summary
bash cve-2026-31431-detect.sh --quiet

# Combine flags
bash cve-2026-31431-detect.sh --json --quiet

No root required. No packages to install beyond a standard shell (bash ≥ 4.3) and optionally python3 for the live AF_ALG socket test.


Exit codes

CodeMeaning
0No vulnerable conditions found
1One or more vulnerable conditions found
2Script error / could not complete checks

Designed for use in DevSecOps pipelines — pipe the JSON output to your SIEM, ticketing system, or compliance dashboard.


Output

The script prints results in two languages:

  • English — full detailed summary with status, risk breakdown, and step-by-step remediation
  • Hungarian (Magyar) — identical content in Hungarian

Both sections are printed to stdout after the per-check results.

Example (clean system)

root@kitploit:~
=== Kernel Version ===
  [INFO] Distro flavour : ubuntu (id=ubuntu, codename=jammy, version=22.04)
  [INFO] Kernel release : 5.15.0-135-generic
  [OK] Kernel version
       Reason : Ubuntu jammy: kernel 5.15.0-135.145 >= patched version 5.15.0-135.145

...

  ✅ PROTECTED — SYSTEM IS NOT VULNERABLE

Example (vulnerable system)

root@kitploit:~
  ❌ VULNERABLE — IMMEDIATE ACTION REQUIRED

  ✗ Kernel version
  ✗ Patch presence
  ✗ algif_aead module
  ✗ AF_ALG socket
  ✗ Setuid binaries

Remediation

Debian

root@kitploit:~
sudo apt update && sudo apt full-upgrade && sudo reboot
# After reboot: uname -v  →  must show >= 6.1.170-1 (Bookworm)

Ubuntu

root@kitploit:~
sudo apt update && sudo apt full-upgrade && sudo reboot
# After reboot: cat /proc/version_signature

Temporary mitigation (if kernel update is not immediately possible)

Only effective when CONFIG_CRYPTO_USER_API_AEAD=m (built as module). Has no effect if the option is compiled in (=y).

root@kitploit:~
echo 'install algif_aead /bin/false' | sudo tee /etc/modprobe.d/disable-algif-aead.conf
sudo rmmod algif_aead 2>/dev/null || true

This does not affect SSH, dm-crypt/LUKS, OpenSSL, GnuTLS, NSS, web servers, or disk encryption.


Important notes

  • This script does not execute any exploit code — configuration and version checks only.
  • Copy Fail is local privilege escalation only — remote exploitation via the internet is not possible.
  • The vulnerability modifies the in-memory page cache; on-disk files are never touched, so file-integrity tools (AIDE, Tripwire, etc.) will not detect an active attack.
  • A reboot clears the page cache but the vulnerability remains — patching is the only permanent fix.
  • Running the script as root may produce false negatives on the AF_ALG socket check (root can always open AF_ALG sockets).

References

  • Debian Security Tracker: https://security-tracker.debian.org/tracker/CVE-2026-31431
  • Ubuntu Security: https://ubuntu.com/security/CVE-2026-31431
  • Ubuntu USN-7523-1: https://ubuntu.com/security/notices/USN-7523-1
  • Upstream fix: https://github.com/torvalds/linux/commit/a664bf3d603dc3bdcf9ae47cc21e0daec706d7a5
  • Exploit details: https://copy.fail
  • Original detection script: https://github.com/liamromanis101/CVE-2026-31431-Copy-Fail---Vulnerability-Detection-Script

License

MIT

Download Tool
#CheckMethod
1Kernel versionuname -r / uname -v / dpkg / /proc/version_signature
2Patch presenceDebian build version, Ubuntu pkg version, commit prefix in /proc/version
3algif_aead module/proc/modules, modprobe.d blacklist, .ko on disk
4AF_ALG socketLive socket(AF_ALG, …) attempt via Python 3
5Setuid binariesCommon setuid-root binaries as write targets
6MitigationsAppArmor, SELinux, seccomp status
7Kernel configCONFIG_CRYPTO_AUTHENC, CONFIG_CRYPTO_USER_API_AEAD
8User namespacesunprivileged_userns_clone, max_user_namespaces
9Transparent hugepagesTHP setting and effect on exploitation
10EnvironmentDocker / Kubernetes / WSL detection, root warning