CVE-2026-31431 – CopyFail

Local Privilege Escalation in the Linux Kernel – Instant Fix for All Major Distros
April 30, 2026 · Updated: May 13, 2026 · Security · Linux · Homelab
Update — May 4, 2026

Debian, Ubuntu, and AlmaLinux have now released patched kernels. The table and distro blocks below have been updated accordingly. If you applied the mitigation (disable-algif-aead.conf), you can remove it after updating your kernel and rebooting.

Update — May 13, 2026

Red Hat has released kernel updates for RHEL 8, 9, and 10. Rocky Linux follows via the same upstream packages. Fedora patches are available in the repositories. Distro table and blocks updated accordingly.

Since 2017, a vulnerability has been lurking in the Linux kernel that allows a local attacker without any privileges to write 4 bytes to arbitrary readable files. That sounds like a small thing – but it's enough for a full privilege escalation. The vulnerability was disclosed on April 29, 2026 under the name CopyFail (CVE-2026-31431).

This article explains what's happening, which systems are affected, and what the instant fix looks like on every major distribution.

What's Going On?

The problem lies in three components that together produce unexpected behavior:

A commit from 2017 (72548b093ee3) introduced this in-place optimization. The fix (a664bf3d603d) reverts AEAD operations back to out-of-place mode and cleanly separates source and destination scatterlists.

Technical core: An unprivileged local user can use an AF_ALG socket combined with splice() to write a controlled 4-byte value into the page cache. This is sufficient to tamper with setuid binaries or configuration files.

Am I Affected?

All kernels from version 4.14 up to and including 6.18.21 and 6.19.11 are vulnerable. This covers practically every production Linux installation from the past several years.

Distribution Affected Kernels Patched Version
Debian 12 (Bookworm) 6.1.x 6.1.170-1 ✓ (Security repo, since 2026-05-01)
Ubuntu 22.04 LTS 5.15.x / 6.5.x Patch available via apt upgrade (since 2026-04-30)
Ubuntu 24.04 LTS 6.8.x Patch pending — patched package not yet in noble-updates/noble-security
Proxmox VE 8 6.8.x / 6.17.x Patch available via Debian Bookworm Security repo
RHEL 8 / Rocky 8 4.18.x 4.18.0-553.123.1 ✓ (May 2026)
RHEL 9 / Rocky 9 / AlmaLinux 9 5.14.x 5.14.0-611.54.1 ✓ (May 2026)
RHEL 10 / AlmaLinux 10 6.12.x 6.12.0-124.55.1 ✓ (May 2026)
Fedora 40 / 41 6.11.x – 6.12.x Patch available in Fedora repositories ✓
Arch Linux Rolling, kernel < 6.18.22 linux 6.18.22+ (Rolling)
Mainline < 6.18.22 / < 6.19.12 6.18.22, 6.19.12, 7.0+

Quick check on any system:

# Show kernel version
uname -r

# Is the module already loaded?
lsmod | grep algif_aead
Note on the module: If algif_aead does not appear in lsmod output, the module is not currently active. However, it can be loaded on-demand at any time – by an application using AF_ALG with AEAD. The instant fix prevents exactly that.

Instant Fix (All Distros)

Until a patched kernel is available, the following measure prevents the vulnerable module from being loaded. It is distribution-independent and takes effect immediately:

# Block the module permanently
echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-aead.conf

# Unload the module if it's already loaded
rmmod algif_aead 2>/dev/null || true

# Verify
cat /etc/modprobe.d/disable-algif-aead.conf

Roll out to multiple servers at once (example using SSH config aliases):

# Deploy to all servers in parallel
for host in server1 server2 server3; do
  ssh "$host" 'echo "install algif_aead /bin/false" \
    > /etc/modprobe.d/disable-algif-aead.conf \
    && echo "OK: $HOSTNAME"' &
done
wait
Effect: If an application attempts to load the module, the load will fail with an error. The exploit path is blocked.

Distro-Specific Notes

Debian 12 (Bookworm) Patched
Kernel: 6.1.x · Patched version: 6.1.170-1 · available since 2026-05-01

Patch is available in the Debian Security repository (DSA published):

apt update && apt upgrade linux-image-$(uname -r)
# After reboot, remove the mitigation:
rm /etc/modprobe.d/disable-algif-aead.conf

Track status: security-tracker.debian.org

Ubuntu 22.04 LTS Patched   Ubuntu 24.04 LTS Pending
22.04: Kernel 5.15.x / 6.5.x · Patch available since 2026-04-30  |  24.04: Kernel 6.8.x · patched package not yet in noble-updates/noble-security
apt update && apt upgrade linux-image-$(uname -r)
# After reboot and kernel update:
rm /etc/modprobe.d/disable-algif-aead.conf
Ubuntu 24.04 (Noble): Although Ubuntu announced the patch, the fixed kernel package has not yet landed in noble-updates or noble-security. Ubuntu delivers kernel security fixes as a new package with an incremented version number (e.g. 6.8.0-112) — that package is currently missing. Until then, the modprobe.d mitigation remains the only effective measure.

Status: ubuntu.com/security/CVE-2026-31431

Proxmox VE 8 Patched
Kernel: pve-kernel 6.8.x / 6.17.x · Patch available via Debian Bookworm Security repo
apt update && apt upgrade pve-kernel-$(uname -r)
# Or use the Proxmox upgrade tool:
pveupgrade

Status: Proxmox Forum · Roadmap

RHEL 8 / 9 / 10  ·  Rocky Linux  ·  AlmaLinux Patched
RHEL 8: 4.18.0-553.123.1 · RHEL 9: 5.14.0-611.54.1 · RHEL 10: 6.12.0-124.55.1
dnf update kernel
# After reboot:
rm /etc/modprobe.d/disable-algif-aead.conf

Status: Red Hat Security Advisory

Arch Linux Update Available
Kernel: Rolling · Patched kernel: 6.18.22+
pacman -Syu linux linux-headers
# After reboot, remove the mitigation:
rm /etc/modprobe.d/disable-algif-aead.conf
Fedora 40 / 41 Patched
Kernel patch available in Fedora repositories
dnf update kernel
# After reboot:
rm /etc/modprobe.d/disable-algif-aead.conf

After the Kernel Update

Once a patched kernel is installed and the system has been rebooted, the temporary block must be removed – so that legitimate applications using AF_ALG AEAD continue to work:

# Verify the new kernel version
uname -r

# Remove the mitigation (only once the kernel is patched!)
rm /etc/modprobe.d/disable-algif-aead.conf

# The module block is now lifted
Patched kernel versions: Mainline 6.18.22+, 6.19.12+, or 7.0+. For distribution kernels, check the respective DSA / Errata of your distro for the exact package version.

Sources & Further Reading