Skip to content
Memory corruption Write-up Advanced

CVE-2026-31431: Copy Fail vs. rootless containers

A Linux kernel vulnerability in the authencesn cryptographic algorithm allowed an unprivileged user to write to the page cache of a setuid binary such as /usr/bin/su, replacing it with a malicious ELF that grants root inside a container. The author shows that rootless Podman's user namespace mapping confines that root to an unprivileged host user, so the escalation does not reach the host.

dragonsreach.it

Published on dragonsreach.it

In the previous post about SELinux MCS and GitLab runners, I briefly mentioned CVE-2026-31431 (“Copy Fail”) as a motivating example for per-job VM isolation. After that post went out I spent the weekend setting up a lab to actually run the exploit, trace it at the syscall level, and verify that the rootless Podman…

The author, on dragonsreach.it

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a scratch write in the kernel's authencesn AEAD implementation that lands in page cache pages spliced into the crypto socket, bypassing file permissions.

Impact

The exploit achieved root inside the container, but user namespace UID mapping confined it to an unprivileged host user, so host files and processes remained out of reach; the author also notes that shared page cache layers could let one container poison binaries used by others.

What the attacker needed

Unprivileged local access; vulnerable kernel (pre-6.19.12); AF_ALG crypto API available

The fix

The kernel was patched in the stable 6.19.x tree starting with 6.19.12, and the author recommends enabling user namespaces for pods on OpenShift.

How it was found

  1. Create an AF_ALG socket and bind it to the authencesn cipher.
  2. Send a message whose payload contains the four bytes to write.
  3. Splice page cache pages of the target binary into the crypto socket.
  4. Repeat until the malicious ELF is fully staged in the page cache.
  5. Execute the target binary, which loads the corrupted pages and runs the payload.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The page cache is a copy of file contents kept in memory so programs load faster. A bug in a kernel crypto routine let an ordinary user overwrite that in-memory copy of a privileged program, so running the program executed attacker code. Rootless containers use user namespaces, which map the container's root user to a normal user on the host, so the attacker only became root inside the container.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.