Podman rootless containers and the Copy Fail exploit

31 points by ggpsv


dgl

This focuses too much on the released exploit rather than the primitive the vulnerability enables. Because the vulnerability allows writing to the page cache, regardless of whether it is read-only, it is possible for a malicious container to tamper with pages belonging to a file in a base image in overlayfs, which depending how the containers are deployed could cross to other containers. (In the rootless setup here, it would be other containers running as the same user on the host system).

An alternative exploit would be to run (or find) a container based on a base image that is known to be in use, tamper with the page cache in that container and then make another container (which shares the runtime and therefore overlayfs data) run that code.

While I think rootless and user namespaces are important, they really don't help here. The copy.fail site mentions that in a container it is possible to use seccomp to block the system call socket(AF_ALG, ...), that's the thing to consider in containers here.