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-mitigate-no-reboot — No-reboot mitigation script for the Copy Fail kernel bug (CVE-2026-31431). Disables the vulnerable algif_aead module and evicts page cache for setuid binaries. | Kitploit
Tools/GitHubGitHub/mrowkoob/copy-fail-mitigate-no-reboot
Defensive ToolsVulnerability AnalysisConfiguration AuditingIncident Response
GitHubmrowkoob/copy-fail-mitigate-no-reboot

copy-fail-mitigate-no-reboot

No-reboot mitigation script for the Copy Fail kernel bug (CVE-2026-31431). Disables the vulnerable algif_aead module and evicts page cache for setuid binaries.

View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
3 months agoNot yet reviewed

copy-fail-mitigate

Minimal no-reboot mitigation helper for Copy Fail / CVE-2026-31431.

This script disables the vulnerable algif_aead module path and attempts to unload the module immediately. It also performs a best-effort page-cache eviction for /usr/bin/su.

This is a mitigation, not a kernel fix. Install your vendor's patched kernel as soon as it is available.

What it does

The script runs the mitigation recommended by the public Copy Fail advisory:

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

This prevents algif_aead from being loaded again via modprobe and unloads it from the running kernel if possible.

It then runs a small Python snippet that calls posix_fadvise() with POSIX_FADV_DONTNEED for the first page of /usr/bin/su:

root@kitploit:~
os.posix_fadvise(fd, 0, page, os.POSIX_FADV_DONTNEED)

This is a best-effort attempt to evict the relevant page from page cache. It is not a substitute for patching and does not guarantee cleanup of every possible targeted setuid binary.

Why /usr/bin/su?

The public Copy Fail proof-of-concept targets /usr/bin/su by default. This script therefore attempts to drop the first page of /usr/bin/su from page cache after disabling the vulnerable module path.

If your environment has tested or suspected exploitation against another setuid binary, review and adapt the script accordingly.

Usage

Review the script first.

root@kitploit:~
sudo ./mitigate-copy-fail.sh

Verify

Check that the module is not loaded:

root@kitploit:~
lsmod | grep '^algif_aead' || echo "algif_aead is not loaded"

Check that the modprobe rule exists:

root@kitploit:~
cat /etc/modprobe.d/disable-algif.conf

Expected output:

root@kitploit:~
install algif_aead /bin/false

Try to load the module manually:

root@kitploit:~
sudo modprobe algif_aead

It should fail or refuse to load.

Revert

Only revert this after installing a fixed kernel or after accepting the risk.

root@kitploit:~
sudo rm -f /etc/modprobe.d/disable-algif.conf
sudo modprobe algif_aead

Limitations

This script does not:

  • patch the kernel;
  • verify whether the running kernel is vulnerable;
  • guarantee eviction of all relevant page-cache state;
  • inspect all setuid binaries;
  • replace vendor security updates;
  • provide container or sandbox hardening.

For untrusted workloads such as containers, sandboxes, CI runners, and multi-user hosts, consider additional hardening such as blocking AF_ALG socket creation with seccomp.

References

  • https://copy.fail/#mitigation
Download Tool