Copy Fail Linux Kernel Flaw Enables Local Root Escalation

Summary
CVE-2026-31431 (“Copy Fail”) lets an unprivileged local user exploit Linux’s algif_aead interface with AF_ALG and splice() to corrupt setuid binaries’ page cache and gain root. Fixes are available in kernels 7.0, 6.19.12 and 6.18.22.
Key points
- The flaw affects Linux’s algif_aead userspace crypto interface and can enable local privilege escalation by corrupting page-cache data backing setuid binaries.
- The article says the vulnerability was introduced by a 2017 in-place-processing change and fixed by a patch series that reverts that change.
- A public proof of concept chains AF_ALG, splice() and recvmsg() to write to cached pages of /usr/bin/su and stage shellcode.
- The article identifies vulnerable kernel versions including 4.14 through 7.0-rc, with fixes in 7.0, 6.19.12 and 6.18.22; downstream LTS backports may also be affected.
- The exploit is local only: an attacker needs an existing foothold or other code execution on the machine before attempting privilege escalation.
- Recommended mitigations include installing the appropriate kernel update, restricting AF_ALG where feasible, and monitoring for unexpected AF_ALG socket creation and setuid-binary modifications.
- The article provides a Falco detection rule for suspicious AF_ALG SEQPACKET sockets and notes that it may require environment-specific tuning.
Article Details
- Vulnerability Types
- Local privilege escalation
- Page-cache corruption
- Severity
- CVSS 7.8 (HIGH)
- Affected Versions
- Linux kernel 4.14 through 7.0-rc
- Linux kernel 6.18.x before 6.18.22
- Linux kernel 6.19.x before 6.19.12
- Linux kernel downstream backports 6.12.x, 6.6.x, 5.15.x, and 5.10.x may be vulnerable
- Exploitation Status
- reported
- Exploit Availability
- public_poc
- Patch Status
- available
- Workarounds
- Restrict AF_ALG socket creation using seccomp profiles or container runtime defaults.
- Disable CONFIG_CRYPTO_USER_API_AEAD on hosts that do not require userspace crypto.
