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
copy-fail-cve-2026-31431 — Passive Linux host scanner that classifies exposure to CVE-2026-31431 via kernel version, distro changelog, module status, and AF_ALG reachability, with JSON output for SIEM integration. | Kitploit
Tools/GitHubGitHub/effiesec/copy-fail-cve-2026-31431
Vulnerability ScannersVulnerability AnalysisConfiguration Auditing
GitHubeffiesec/copy-fail-cve-2026-31431

copy-fail-cve-2026-31431

Passive Linux host scanner that classifies exposure to CVE-2026-31431 via kernel version, distro changelog, module status, and AF_ALG reachability, with JSON output for SIEM integration.

View Repository
3 months agoNot yet reviewed

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 Checker for Copy Fail (CVE-2026-31431)

Authors/Contributors: Patrick Doyle (Author/Maintainer), Effie Renard (Co-Author), Kimberly-Lee Banks (Co-Author), Chris F. (Support/Code Review)

AI Disclosure: Claude Code used for writing tests files, writing test data, and a code security review. All edits were manually audited by one of the contributors.

Description

Single statically-linked Go binary that classifies a Linux host's exposure to CVE-2026-31431.

The tool is passive. It does not exploit the bug. The mechanism probe (see safety statement below) issues exactly two syscalls and never touches the vulnerable code path.


What it Checks

SignalSourceFlag
Kernel version vs. upstream fixuname(2)--kernel-version
Distro changelog mentions the CVEapt/rpm/apk or on-disk changelog.Debian.gz--changelog
algif_aead module status/proc/modules, modprobe.d, /lib/modules--module
Vulnerable surface reachablesocket(AF_ALG) + bind(authencesn(...))--mechanism
Compiled into vmlinux/boot/config-$(uname -r) or A (one-/proc/config.gz(part of --module)

If no check flags are given, all four run.


Output Modes

ModeTriggerUse case
Pretty styled (Default)TTY stdout, no --format override, no NO_COLOR envInteractive shell runs
Plain textnon-TTY stdout, OR --format=text, OR NO_COLOR=1, OR --no-colorShell Scripts, Pipes
JSON--format=jsonSyslog/SIEM ingest, Shell Scripts
Quiet--quietExit code only (automation/scripts)

Force pretty when piped: cvecheck --pretty | tee report.txt. Force plain in a TTY: cvecheck --no-color or NO_COLOR=1 cvecheck.


Safety Statement (Mechanism Probe)

The probe issues exactly two syscalls socket(AF_ALG, SOCK_SEQPACKET, 0), and bind(fd, &SockaddrALG{Type:"aead", Name:"authencesn(hmac(sha256), cbc(aes))"}). It's then followed by close(fd). It performs no setsockopt for a key, no accept, no sendmsg, no splice, and no pipe creation. The vulnerable code path requires sendmsg of crypto data combined with a splice from a page-cache-backed file descriptor; none of those operations occur, so the bug cannot trigger.

A successful probe means the surface is reachable. Whether the kernel still contains the bug is decided by the kernel-version + changelog signals.

Side effect: a successful bind autoloads algif_aead via the kernel module autoloader. The module check runs before the mechanism probe so the loaded-state report is pre-probe. To suppress autoload entirely, blacklist algif_aead first.


Exit Codes

CodeMeaning
0PATCHED / NOT_VULNERABLE / MITIGATED / LIKELY_NOT_EXPLOITABLE
2VULNERABLE or MECHANISM_REACHABLE (partial scan, kernel-version not checked)
3INCONCLUSIVE (insufficient signals)

Distro Coverage

DistroDetectKernel pkgNotes
Ubuntu / Debian / Mint / Pop!_OSaptlinux-image-$(uname -r)Disk-first changelog read avoids apt changelog network fragility on signed kernels
RHEL / CentOS / Rocky / Alma / Fedora / Amazon LinuxrpmkernelShips algif_aead built-in (CONFIG_..._AEAD=y); blacklist mitigation not effective
Oracle Linuxrpmkernel or kernel-uekUEK detected via uek substring in uname -r
openSUSE / SLESrpmkernel-default
Alpineapklinux-lts / linux-virt / etc.Flavor picked from release suffix
Arch / CachyOS / Manjaro / Endeavour / Gentoononen/aRolling/source: relies on kernel-version check

Deploy

Automatic Install

Auto-detects your arch, downloads the right binary into $(pwd), and verifies its SHA-256 against the published SHA256SUMS:

root@kitploit:~
curl -fsSL https://copyfail.pcdoyle.dev/install.sh | sh

The script exits non-zero on checksum mismatch and removes the bad file.

Download Binary (manual)

Pick the binary for your host architecture:

ArchitectureBinary
Intel/AMD 64-bit (x86_64)cvecheck-linux-x86_64
ARM 64-bit (aarch64)cvecheck-linux-arm64
Intel/AMD 32-bit (i?86)cvecheck-linux-x86

Verify before running:

root@kitploit:~
curl -LO https://github.com/pcdoyle/copy-fail-cve-2026-31431/releases/latest/download/cvecheck-linux-x86_64
curl -LO https://github.com/pcdoyle/copy-fail-cve-2026-31431/releases/latest/download/SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMS
chmod +x cvecheck-linux-x86_64

Build from Source

root@kitploit:~
make build  # bin/cvecheck-linux-{x86_64,arm64,x86}
# SCP(SFTP) to Server:
scp ./bin/cvecheck-linux-x86_64 host:/tmp/  # Less than 4 MB, static, no glibc dep

Run the Program

SSH to Host

root@kitploit:~
# SSH:
ssh <host>
# Run Binary:
/tmp/cvecheck-linux-x86_64  # Human friendly pretty output.
/tmp/cvecheck-linux-x86_64 --format=json # Script, Syslog, and SIEM friendly
/tmp/cvecheck-linux-x86_64 --format=text # Script, and Pipe friendly

Run as SSH Remote Command

root@kitploit:~
ssh <host> /tmp/cvecheck-linux-x86_64   # If run directly defaults to --format=text
ssh <host> /tmp/cvecheck-linux-x86_64 --format=json # Syslog/SIEM-friendly

For Containers/Chroot:

Mount the host root somewhere readable and pass --root:

root@kitploit:~
docker run --rm -v /:/host:ro alpine /tmp/cvecheck --root /<host-path>

--root controls all on-disk lookups (/etc/os-release, modprobe.d, /lib/modules, /boot/config-*, changelog files). The kernel-version and mechanism probes still touch the running kernel via uname(2) and socket(AF_ALG, ...).


Precedence Ladder

Resolved in this order (first match wins):

  1. PATCHED: Distro changelog references the CVE ID.
  2. NOT_VULNERABLE: Running kernel >= upstream fixed version.
  3. MITIGATED: algif_aead Blacklisted and not loaded and not built into vmlinux.
  4. LIKELY_NOT_EXPLOITABLE: AF_ALG unavailable and module not on disk.
  5. MECHANISM_REACHABLE: Surface reachable but kernel version not checked.
  6. VULNERABLE: Kernel in vuln range and mechanism reachable.
  7. INCONCLUSIVE: None of the above match.

If --mechanism runs alongside --kernel-version and both signal trouble, the result is VULNERABLE with a remediation hint.


Remediation hints

  • Loadable-module distros (Debian, Ubuntu, SUSE, Alpine, Arch): blacklist algif_aead until kernel upgrade lands.
    root@kitploit:~
    echo 'blacklist algif_aead' | sudo tee /etc/modprobe.d/cve-2026-31431.conf
    sudo rmmod algif_aead 2>/dev/null
    
  • Built-in distros (RHEL, CentOS, Rocky, Alma, Oracle, Amazon): blacklist files are no-ops because CONFIG_CRYPTO_USER_API_AEAD=y puts the symbol inside vmlinux. Only a kernel upgrade (or kpatch-style live patch) resolves exposure. The tool detects this.

Troubleshooting

SymptomCauseFix
changelog: error="apt: exit status 100 ... Changelog unavailable for linux-signed-amd64"Debian/Ubuntu signed kernel; apt mirror does not serve the source-pkg changelogError appears only when the on-disk file is missing in addition to the mirror being inaccessable, install apt-doc or wait for the mirror.
module: ... config_src=""No kernel config readable (no /boot/config-*, no /proc/config.gz, /boot is root-only)Run as root, or accept that BuiltIn cannot be determined. Verdict may still resolves via other signals.
mechanism: error="EAFNOSUPPORT"Kernel built without CONFIG_CRYPTO_USER_API, so the host is not vulnerable via AF_ALGVerdict will be LIKELY_NOT_EXPLOITABLE.

Sources

  • NIST CVE Database
  • Official Copy.Fail Site
  • Official Technical Write-up
  • oss-security advisory
  • Theori writeup
  • Bugcrowd summary
Download Tool