Desert Forge IT — Arizona IT · Field-tested tools & guidesFree consult →

CVE-2026-31431 "Copy Fail": 732-Byte Linux Root Exploit, Actively Exploited

High CVE-2026-31431 — Copy Fail lets any local Linux user write 4 bytes into the cached copy of any readable file and get root on kernels back to 2017. It's on CISA's exploited list. How to check, patch, and block it.

Published 2026-10-08 · Last updated 2026-10-08

TL;DR: A logic bug in the kernel's AF_ALG crypto socket lets an unprivileged user overwrite 4 bytes of any file they can read, in memory. Overwriting a setuid binary gives root. A public 732-byte exploit works on almost every distro since 2017, and CISA lists it as exploited in the wild. Patch the kernel, or block the algif_aead module today.

CVECVE-2026-31431 (“Copy Fail”)
ComponentLinux kernel crypto/algif_aead (AF_ALG)
TypePage-cache write → local privilege escalation, possible container escape
CVSS 3.17.8 High
AffectedKernel 4.14 (2017) and newer, until fixed
Fixed inMainline commit a664bf3d603d (2026-04-01); Proxmox VE 8 proxmox-kernel-6.8.12-22; Debian 12 6.1.170-1; Debian 13 6.12.85-1
Exploited?Yes, added to CISA KEV 2026-05-01
WorkaroundYes: block the algif_aead kernel module

What the bug is

Linux exposes its internal crypto code to user programs through a socket type called AF_ALG. In 2017 an optimisation made the AEAD part of it (algif_aead) decrypt “in place”. Combined with splice(), which hands file pages directly to the socket, that lets the authencesn template write 4 bytes of attacker-chosen data into the page cache, the kernel’s in-memory copy of a file.

It works on any file the attacker can merely read. The researchers at Theori showed a 732-byte Python script that patches a setuid-root binary in memory and runs it. Any local account, including a hacked web app running as www-data, gets root within seconds.

Timeline: reported to the kernel team 2026-03-23, fixed in mainline 2026-04-01, disclosed 2026-04-29, and on CISA’s Known Exploited Vulnerabilities list two days later.

Containers and the page cache

The page cache is shared by every process on the machine, across container boundaries. A file shared between a container and the host (a common base image layer, a bind mount) can be modified from inside the container, and the host sees the modified copy. That is why Copy Fail is treated as a potential container escape and not just a local root bug.

The write also skips the normal write path, so the page is never marked dirty and never reaches disk. On-disk integrity checks like debsums or AIDE won’t see it, and a reboot or cache eviction erases the evidence.

Am I affected?

# Kernel you are running
uname -r

# Is the vulnerable module loaded / blocked?
lsmod | grep algif_aead
grep -r algif_aead /etc/modprobe.d/

# Proxmox: which kernel build first carried the fix?
apt changelog proxmox-kernel-6.8 2>/dev/null | grep -m1 -B6 'copy.fail'
PlatformFixed in
Proxmox VE 8 (6.8)proxmox-kernel-6.8.12-22 (2026-04-30)
Proxmox VE 9Fixed kernels published 2026-04-30. Check apt changelog for your kernel series.
Debian 12 bookworm6.1.170-1 (DSA-6243-1)
Debian 13 trixie6.12.85-1 (DSA-6238-1)
Ubuntu / RHEL / SUSE / Amazon LinuxAll confirmed exploitable before patching. Install the vendor kernel update for CVE-2026-31431.

How to patch

# Debian / Ubuntu / Proxmox
apt update && apt full-upgrade
reboot
uname -r     # confirm the new kernel is running

As with any kernel fix, the update does nothing until you reboot into it.

Workaround: block algif_aead

Unlike most kernel bugs, this one has a clean stopgap. Very little userspace software uses AF_ALG’s AEAD interface, so blocking the module is low-risk for most servers (test on one box first):

echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-aead.conf
rmmod algif_aead 2>/dev/null
lsmod | grep algif_aead   # should print nothing

On a Proxmox host this protects every container, because containers can’t load kernel modules themselves. Keep the block in place until you’ve rebooted into a fixed kernel, then you can remove it.

Detecting exploitation

Since the tampering lives only in memory, look at behaviour instead of files:

  • Unexpected root shells or processes whose parent is a service account (www-data, mc, nobody).
  • AF_ALG socket use by processes that have no business doing crypto. With auditd: auditctl -a always,exit -F arch=b64 -S socket -F a0=38 -k af_alg (38 = AF_ALG).
  • New SSH keys, users, cron jobs, or systemd units created around the time a web app or game server was compromised.

Sources

← Back to Knowledge Base

Want this handled for you?

Desert Forge IT patches, monitors, and backs up servers and networks for Phoenix-area businesses. We track advisories like this one so you don’t have to. Get a free consult and we’ll tell you what you’re exposed to.

Get a free security check →  ·  More security advisories