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_je_sappelle_RoOt — CVE-2026-31431 - Guide de Remédiation et Mesures de Protection | Kitploit
Tools/GitHubGitHub/sbeteta42/cve-2026-31431_je_sappelle_root
Vulnerability AnalysisConfiguration AuditingLearning & EducationIncident ResponseCurated Resources
GitHubsbeteta42/cve-2026-31431_je_sappelle_root

CVE-2026-31431_je_sappelle_RoOt

CVE-2026-31431 - Guide de Remédiation et Mesures de Protection

View Repository
13 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-2026-31431 - Copy Fail - Je s'appelle ROOT !#

CVE Type Platform Status

📌 Repository Purpose

This repository documents the CVE-2026-31431 vulnerability, nicknamed Copy Fail, and provides a defensive remediation procedure for potentially exposed Linux systems.

⚠️ This repository is strictly focused on defense, authorized auditing, hardening, and remediation.
It does not provide an exploitation procedure and must not be used to compromise third-party systems.


1. Executive Summary

CVE-2026-31431 / Copy Fail is a local privilege escalation vulnerability in the Linux kernel.

It affects the kernel's cryptographic subsystem, more specifically the AF_ALG user interface and the algif_aead module. The flaw is related to an optimization introduced in 2017 in the Linux kernel's AEAD path. Under certain conditions, an unprivileged local user can trigger a controlled write into the of a readable file, notably a setuid binary, which can lead to privilege escalation to .

page cache
root

The vulnerability is rated High with a CVSS v3.1 score of 7.8.


2. CVE Information

ElementDetail
CVECVE-2026-31431
Public nameCopy Fail
TypeLocal Privilege Escalation, LPE
ComponentLinux kernel crypto subsystem
Affected modulealgif_aead
InterfaceAF_ALG
Mechanism involvedAEAD, authencesn, splice(), page cache
CVSS v3.1 score7.8 High
Privileges requiredUnprivileged local account
User interactionNone
ImpactHigh confidentiality, integrity, and availability

3. Affected Systems

Public sources indicate that Linux distributions shipping a kernel derived from a vulnerable branch since the 2017 optimization may be exposed.

Examples of platforms mentioned in public publications:

DistributionExample of publicly tested kernel 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
DebianDepending on kernel version and security status
AlmaLinux / Rocky Linux / Oracle LinuxDepending on kernel version and vendor backports

The exact status depends on the kernel version, vendor, security backports, and already applied patches.


4. Why This Flaw Is Critical

This vulnerability is particularly dangerous in environments where untrusted users or workloads have access to a local shell or a shared execution environment.

Environments to prioritize:

  • multi-user servers;
  • SSH servers exposed to multiple accounts;
  • training or lab platforms;
  • CI/CD runners;
  • build servers;
  • Kubernetes clusters;
  • container hosts;
  • shared hosting platforms;
  • multi-tenant cloud environments.

Main risk:

  • local escalation to root;
  • host compromise;
  • partial bypass of disk integrity controls because the modification can reside in memory via the page cache;
  • potential impact on containers sharing the same host kernel.

5. Quick Verification

5.1 Identify the kernel version

root@kitploit:~
uname -a
uname -r

5.2 Check whether the algif_aead module is loaded

root@kitploit:~
lsmod | grep algif_aead || true

5.3 Check whether AF_ALG sockets are in use

root@kitploit:~
sudo lsof -nP | grep AF_ALG || true

5.4 Identify installed kernel packages

Debian / Ubuntu

root@kitploit:~
dpkg -l | grep -E '^ii\\s+linux-image|^ii\\s+linux-modules'

RHEL / Rocky / AlmaLinux / Fedora

root@kitploit:~
rpm -qa | grep -E '^kernel|^kernel-core'

SUSE

root@kitploit:~
rpm -qa | grep -E '^kernel'

6. Recommended Remediation

Priority option: apply the vendor kernel patch The proper remediation is to install a patched kernel provided by the distribution, then reboot onto that kernel.

Debian / Ubuntu

root@kitploit:~
sudo apt update
sudo apt full-upgrade -y
sudo reboot

RHEL / Rocky / AlmaLinux / Oracle Linux

root@kitploit:~
sudo dnf update -y kernel kernel-core kernel-modules
sudo reboot

SUSE

root@kitploit:~
sudo zypper refresh
sudo zypper patch
sudo reboot
# After reboot:
uname -r
  • Then check the status in the distribution's security tracker.

7. Temporary Mitigation

If no patched kernel is yet available or if an immediate reboot is impossible, apply a temporary mitigation.

7.1 Disable loading of algif_aead

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

7.2 Unload the module if already loaded

root@kitploit:~
sudo modprobe -r algif_aead 2>/dev/null || true
sudo rmmod algif_aead 2>/dev/null || true

7.3 Update the initramfs if necessary

Debian / Ubuntu

root@kitploit:~
sudo update-initramfs -u

RHEL / Rocky / AlmaLinux / Oracle Linux

root@kitploit:~
sudo dracut -f

SUSE

root@kitploit:~
sudo mkinitrd

7.4 Reboot

root@kitploit:~
sudo reboot

7.5 Verify that the module can no longer be loaded

root@kitploit:~
sudo modprobe algif_aead
echo $?
  • Expected result: loading must fail.

8. Special Case: Module Compiled Directly Into the Kernel

On some kernels, the module may be compiled directly into the kernel and cannot be loaded/unloaded as a module.

  • Indicative check:
root@kitploit:~
grep CONFIG_CRYPTO_USER_API_AEAD /boot/config-$(uname -r)
  • Possible results:
root@kitploit:~
CONFIG_CRYPTO_USER_API_AEAD=m

The component is a module. The mitigation via /etc/modprobe.d/ is applicable.

root@kitploit:~
CONFIG_CRYPTO_USER_API_AEAD=y

The component is built into the kernel. The modprobe.d mitigation is not sufficient.

In this case, preferably use:

  • a patched kernel;
  • a vendor livepatch if available;
  • a boot option documented by your vendor.

Some sources mention the following kernel option as a possible workaround:

root@kitploit:~
initcall_blacklist=algif_aead_init

Must be tested outside production before general deployment. This option may vary depending on the kernel, distribution, and boot configuration.

9. Hardening Containerized Environments

For Docker, Podman, Kubernetes, and CI/CD, the ability for untrusted workloads to open AF_ALG sockets must be reduced.

Recommended measures:

  • Apply the kernel patch on host nodes;
  • Block or restrict AF_ALG via seccomp when possible;
  • Avoid privileged workloads;
  • Forbid privileged: true containers unless absolutely necessary;
  • Enable AppArmor, SELinux, or equivalent;
  • Isolate CI/CD runners executing untrusted code;
  • Prefer dedicated nodes for sensitive workloads.

10. Detection and Monitoring

10.1 Search for AF_ALG usage

root@kitploit:~
sudo lsof -nP | grep AF_ALG || true

10.2 Search for the loaded module

root@kitploit:~
lsmod | grep algif_aead || true

10.3 Monitor critical setuid binaries

root@kitploit:~
find / -perm -4000 -type f 2>/dev/null

10.4 Monitor suspicious access to /usr/bin/su

root@kitploit:~
sudo ausearch -f /usr/bin/su 2>/dev/null || true

10.5 Example auditd rule

root@kitploit:~
sudo auditctl -w /usr/bin/su -p x -k su_exec_monitoring
  • Then consult:
root@kitploit:~
sudo ausearch -k su_exec_monitoring

11. Incident Action Plan

If exploitation is suspected:

  • Isolate the machine from the network;
  • Preserve logs;
  • Reboot to purge the page cache;
  • Verify system integrity;
  • Review local accounts;
  • Look for recently added SSH keys;
  • Check cron and systemd tasks;
  • Rotate passwords and secrets;
  • Apply the patched kernel;
  • Reboot and validate the active version;
  • Reintegrate the machine only after verification.

Useful commands:

root@kitploit:~
last -a
lastlog
getent passwd
sudo find /etc/cron* -type f -ls 2>/dev/null
sudo find /root /home -name authorized_keys -type f -ls 2>/dev/null
sudo journalctl --since "48 hours ago"

12. Remediation Checklist

  • Inventory exposed Linux machines.
  • Identify kernel versions.
  • Check vendor security bulletins.
  • Prioritize multi-user servers, CI/CD, Kubernetes, and containers.
  • Apply the vendor kernel patch.
  • Reboot onto the patched kernel.
  • Apply the temporary mitigation if the patch is not yet available.
  • Block or restrict AF_ALG in containerized environments.
  • Monitor access to setuid binaries.
  • Check for traces of privilege escalation.
  • Document the actions taken.

13. Example Defensive Mitigation Script

root@kitploit:~
#!/usr/bin/env bash
set -euo pipefail

echo "[+] CVE-2026-31431 - temporary algif_aead mitigation"

if [[ $EUID -ne 0 ]]; then
  echo "[-] This script must be run as root."
  exit 1
fi

echo "[+] Active kernel version: $(uname -r)"

echo "[+] Persistent disabling of algif_aead loading"
echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-aead.conf

echo "[+] Attempting to unload the module"
modprobe -r algif_aead 2>/dev/null || true
rmmod algif_aead 2>/dev/null || true

if command -v update-initramfs >/dev/null 2>&1; then
  echo "[+] Updating initramfs Debian/Ubuntu"
  update-initramfs -u
elif command -v dracut >/dev/null 2>&1; then
  echo "[+] Updating initramfs via dracut"
  dracut -f
elif command -v mkinitrd >/dev/null 2>&1; then
  echo "[+] Updating initramfs via mkinitrd"
  mkinitrd
else
  echo "[!] No known initramfs tool detected. Verify manually."
fi

echo "[+] Verification"
lsmod | grep algif_aead && echo "[!] Module still loaded" || echo "[OK] Module not loaded"

echo "[+] Reboot recommended."

14. Mitigation Limitations

  • Mitigation by disabling the algif_aead module is a temporary workaround.

It does not replace:

  • installing a patched kernel;

  • rebooting onto the patched kernel;

  • validating the vendor status;

  • post-incident analysis if a compromise is suspected.

  • It may also affect certain software explicitly configured to use the AF_ALG cryptographic interface.

15. References

Theori / Xint Code — Copy Fail Technical Write-up https://xint.io/blog/copy-fail-linux-distributions Theori GitHub PoC repository https://github.com/theori-io/copy-fail-CVE-2026-31431 NVD — CVE-2026-31431 https://nvd.nist.gov/vuln/detail/CVE-2026-31431 CERT-EU — Security Advisory 2026-005 https://cert.europa.eu/publications/security-advisories/2026-005/ Ubuntu Security — CVE-2026-31431 https://ubuntu.com/security/CVE-2026-31431 Debian Security Tracker — CVE-2026-31431 https://security-tracker.debian.org/tracker/CVE-2026-31431 SUSE CVE Tracker — CVE-2026-31431 https://www.suse.com/security/cve/CVE-2026-31431.html Tenable FAQ — Copy Fail https://www.tenable.com/blog/copy-fail-cve-2026-31431-frequently-asked-questions-about-linux-kernel-privilege-escalation

16. Legal Disclaimer

This repository is provided solely for the following purposes:

  • educational;
  • defensive;
  • authorized auditing;
  • remediation;
  • system hardening.

Any unauthorized offensive use is illegal and contrary to the purpose of this repository.

Download Tool