Initial impact: same outcome, different blast radius
/etc/passwd or a setuid binary), they own the box.
But "local privilege escalation to root" describes the destination, not the road. The road matters because it determines how reliably the exploit works, whether it leaves traces, and whether you can block it without a kernel update.
The race condition road: Dirty COW
madvise(MADV_DONTNEED) call that discards it. By rapidly alternating between writing and discarding, an attacker can trick the kernel into writing directly to the original page cache instead of the private copy.
Key mechanical properties:
- Probabilistic. It is a race condition. The attacker needs to win the race, which typically requires many attempts. On a busy system, timing varies. The exploit might take seconds or minutes, and it can occasionally crash the process or corrupt memory in unintended ways.
- Broad attack surface. Any readable file can be targeted. No special kernel module needs to be loaded. If the kernel is vulnerable, the exploit works.
- Noisy under observation. Rapid
madvisecalls and repeated page faults generate detectable patterns in system call traces and performance counters, though few people were monitoring for this in 2016. - Existed for nearly a decade. The bug was introduced around kernel 2.6.22 (2007) and went unpatched until 2016. Every Linux system in that window was vulnerable.
The deterministic logic flaw road: Copy Fail
AF_ALG socket interface and the authencesn module. Due to a long-standing in-place optimization, the crypto subsystem writes output directly back into the source pages under certain conditions. An unprivileged user can open an AF_ALG socket, feed it pages from a readable file, and force a controlled 4-byte write back into the page cache of that file.
Key mechanical properties:
- Deterministic. No race condition. No timing sensitivity. The logic flaw fires reliably on every attempt. According to public write-ups, the exploit fits in roughly 732 bytes of code. That reliability is what makes it dangerous.
- Narrow attack surface. Requires the
af_algandauthencesnkernel modules to be loaded (or loadable). Many production web servers never use the kernel crypto API from userspace, which means the module may not be loaded by default — but on many distributions, an unprivileged user can trigger module auto-loading. - Quiet. A single
AF_ALGsocket operation looks like normal crypto usage. No thousands of rapid system calls. No repeated page faults. Harder to spot without specific audit rules. - Smaller write primitive. A controlled 4-byte write is enough to modify
/etc/passwdor patch a binary, but it is more constrained than Dirty COW's arbitrary-length write window.
Critical discovery: what drives your patch decision
| Factor | Dirty COW (CVE-2016-5195) | Copy Fail (CVE-2026-31431) |
|---|---|---|
| Exploit reliability | Probabilistic (race condition) | Deterministic (logic flaw) |
| Required kernel module | None (core mm subsystem) | af_alg / authencesn |
| Temporary mitigation possible | No practical mitigation short of patching | Blacklist or unload the module |
| Detection difficulty | Moderate (noisy syscall pattern) | High (looks like normal crypto op) |
| Exploit complexity | Moderate (needs race-winning loop) | Low (short, reliable, scriptable) |
authencesn is not loaded and cannot be auto-loaded, the exploit has no entry point.
Temporary mitigation for Copy Fail
BASH
lsmod | grep authencesnBASH
sudo modprobe -r authencesnBASH
echo 'install authencesn /bin/false' | sudo tee /etc/modprobe.d/blacklist-copyfail.conf/bin/false instead of loading the module, effectively blocking it. This is a stopgap, not a fix. The underlying code is still vulnerable. Patch and reboot as soon as your maintenance window allows.
Note: whether this mitigation is sufficient depends on your distribution and kernel configuration. Some setups may have the crypto code compiled directly into the kernel rather than as a loadable module, in which case blacklisting does nothing. Verify with your distro's advisory.
The architectural fix and what to verify after patching
uname -r. A newer kernel version string does not guarantee the specific CVE fix is included — backport patching means the fix might land in a kernel that keeps the same version number. Check the package changelog for the specific CVE ID. For more on why uname -r alone is insufficient, see Thinking uname -r Proves You're Patched Against a Kernel LPE? Check the Changelog.
For Copy Fail specifically, verify the module behavior after patching:
BASH
# Confirm patched kernel is running
uname -r
# Check package changelog for CVE reference
# On RHEL/CentOS:
rpm -q --changelog kernel | grep -i 'CVE-2026-31431'
# On Debian/Ubuntu:
apt changelog linux-image-$(uname -r) 2>/dev/null | grep -i 'CVE-2026-31431'How to think about the next one
- Is the exploit deterministic or probabilistic? Deterministic exploits get weaponized faster. Public proof-of-concept code for Copy Fail appeared quickly because the bug is reliable and simple. Race conditions like Dirty COW still get exploited, but there is a slightly wider window before reliable tooling spreads.
- Can you cut the attack surface without patching? If the vulnerability lives in a loadable module your workload does not need, unloading and blacklisting buys real time. If it is in core kernel code (memory management, filesystem layer, scheduler), there is no shortcut.
- What does exploitation look like in logs? If the exploit is noisy, you can at least detect attempts while you schedule the patch. If it is quiet, assume any delay is time an attacker could be using.
- Does your environment even expose the attack surface? A kernel LPE requires local access. On a shared hosting server where customers have shell access, that is immediate risk. On a dedicated server where only your team has SSH, the exposure is lower (but not zero — a compromised web application gives local access too).
