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

122 points - today at 3:43 AM

Source

Comments

itvision today at 11:42 AM
amluto today at 4:09 AM
Sigh.

1. I would hope the default seccomp policy blocks AF_ALG in these containers. I bet it doesn’t. Oh well.

2. The write-to-RO-page-cache primitive STILL WORKED! It’s just that the particular exploit used had no meaningful effect in the already-root-in-a-container context. If you think you are safe, you’re probably wrong. All you need to make a new exploit is an fd representing something that you aren’t supposed to be able to write. This likely includes CoW things where you are supposed to be able to write after CoW but you aren’t supposed to be able to write to the source.

So:

- Are you using these containers with a common image or even a common layer in an image to isolate dangerous workloads from each other. Oops, they can modify the image layers and corrupt each other. There goes any sort of cross-tenant isolation.

- What if you get an fd backed by the zero page and write to it? This can’t result in anything that the administrator would approve of.

- What if you ro-bind-mount something in? It’s not ro any more.

Titan2189 today at 4:57 AM
> [...] that root was just my unprivileged podman user on the host

Couldn't you then simply re-run the exploit again as unprivileged podman user and gain root on the host?

netheril96 today at 7:31 AM
If the goal is just preventing full root privileges, a CapabilityBoundingSet in a systemd unit will do.

However copy fail can be used in many other ways not contained by containers or the above settings. For example it can modify the /etc/ssl/certs to prepare for MitM attacks. If you have multiple containers based on the same image then one compromised CA set affects another.

2bitencryption today at 4:08 AM
tl;dr - within the container, the exploit works, and elevates to root (uid 0) within the container - BUT because that namespace actually maps to uid 1000 (the user) outside the container, the escalation does not flow up to the host.

But
 does this escape the container? If not (the author seems to indicate it does not) then does it matter if you are in Docker or rootless Podman, right, since the end result is always: you have elevated to root within the container. If the rest of the container filesystem isolation does its job, the end result is the same? Though I guess another chained exploit to escape the container would be worse in Docker? Do I have that right?

eqvinox today at 4:01 AM
Running sstrip on an ELF binary is called ELF "golfing"? TIL

walletdrainer today at 6:13 AM
This feels LLM generated, lots of emdashes and even more text around a completely false premise.
washbasin today at 4:00 AM
Please post a tl;dr at the top or even in the subject. Many of us are scrambling to patch/reboot our **.
kator today at 12:08 PM
[dead]
HollowRidge427 today at 10:08 AM
[dead]
CalmBirch127 today at 10:07 AM
[dead]
foreman_ today at 4:11 AM
[dead]
BoldBrook418 today at 10:09 AM
[dead]
QuietLedge375 today at 4:08 AM
[dead]
hackeman300 today at 3:58 AM
[dead]
averi today at 5:08 AM
[flagged]
averi today at 5:00 AM
[flagged]
averi today at 4:41 AM
[flagged]