Skip to content

Back to the catalog

Copy Fail (CVE-2026-31431): 9-year-old Linux kernel LPE found by AI-assisted fuzzing
copy.failadvisory

Copy Fail (CVE-2026-31431): 9-year-old Linux kernel LPE found by AI-assisted fuzzing

Copy Fail (CVE-2026-31431) is a 9-year-old Linux kernel logic bug in algif_aead, reachable via the AF_ALG crypto API and chained through splice() into a 4-byte page-cache write to achieve local root, affecting kernels built between 2017 and the fix. The site publishes a 732-byte stdlib-only Python PoC that roots multiple distributions unmodified, identifies the fixing mainline commit a664bf3d603d, and gives interim mitigation (disable algif_aead / seccomp-block AF_ALG for untrusted workloads). The bug was found by Xint Code's AI-assisted fuzzing against the Linux crypto/ subsystem in roughly an hour of scan time.

TL;DR A 9-year-old Linux kernel logic flaw (CVE-2026-31431, "Copy Fail") in algif_aead/AF_ALG gives unprivileged local root via a tiny Python PoC, discovered by AI-assisted fuzzing and fixed by reverting commit a664bf3d603d.
Document

What it is

Copy Fail (CVE-2026-31431), a Linux kernel local privilege escalation in the algif_aead crypto path (the page names the authencesn code), reachable by any unprivileged local user. The page adds operational detail the catalog summary omits: exact commands, a prioritization of which hosts to patch first, and detection queries.

Preconditions / Affected

Kernels built between 2017 and the patch — "essentially every mainstream distribution" out of the box, since the kernel crypto API (AF_ALG) ships enabled by default. Needs only a local unprivileged account: no network, no kernel debug features, no pre-installed primitives. It grants no remote access by itself, but converts any local code execution into root.

What to do

Patch first — update to a kernel including mainline commit a664bf3d603d, which reverts the 2017 in-place optimization so page-cache pages can no longer land in the writable destination scatterlist. Before you can patch, disable the module:

# echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif.conf
# rmmod algif_aead

For untrusted workloads (containers, sandboxes, CI), block AF_ALG socket creation via seccomp regardless of patch state. To check whether disabling breaks anything, look for active AF_ALG users:

lsof | grep AF_ALG
ss -xa

The published PoC is Python 3.10+, stdlib only (os, socket, zlib). It targets /usr/bin/su by default; pass another setuid binary as argv[1]. Issue tracker: https://github.com/theori-io/copy-fail-CVE-2026-31431

Patch-first priority

The page ranks exposure rather than treating all hosts equally:

flowchart TD
    A[Affected kernel] --> B{Who has shell?}
    B -->|Multiple users: dev boxes, jump hosts, build servers| C[Patch first]
    B -->|CI runners executing untrusted PR code| C
    B -->|Multi-tenant containers / notebook / serverless| C
    B -->|Single-tenant, only your team| D[Lower urgency]
    C --> E[Node compromise crosses tenant boundaries via shared page cache]

A container with the right primitives compromises the node and crosses tenant boundaries because the page cache is shared across the host.

Caveats

Directly verified distributions are a listed subset; Debian, Arch, Fedora, Rocky, Alma, Oracle and embedded systems are stated to "behave the same" but noted as not all individually tested. Disabling algif_aead breaks the AF_ALG.afalg engine, some embedded crypto offload paths, and applications binding aead/skcipher/hash sockets directly — otherwise "nothing measurable." The AI-fuzzing origin (Theori's Xint Code, ~1 hour of scan time) is a vendor claim tied to a marketing write-up.

Organisations named here

  • a664bf3d603d
  • algif_aead

CVEs named here

  • CVE-2026-31431

Technologies named here

  • Xint Code
  • Linux kernel
  • Copy Fail PoC
  • Linux distributions
  • Debian, Arch, Fedora, Rocky, Alma, Oracle Linux
  • AF_ALG / algif_aead
  • Linux
  • Python
  • AF_ALG

Techniques named here

  • Logic-flaw local privilege escalation via kernel crypto API