CVE-2026-31431: Copy Fail vs. rootless containers
122 points - today at 3:43 AM
SourceComments
The dedicated website: https://copy.fail
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.
Couldn't you then simply re-run the exploit again as unprivileged podman user and gain root on the host?
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.
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?