Bind Mounts Across Mount Namespaces: Four PRs and a Container Escape
Making GitHub Actions container: jobs work through ephemerd's Docker API shim took four tries, then a TOCTOU race turned the working version into an escape.
GitHub Actions has a container: key that runs a job’s steps inside an image of your choosing. It’s popular because
it gives you a reproducible toolchain without building a custom runner image. On a self-hosted runner it works by
having the runner drive Docker. On ephemerd, “Docker” is a shim that
speaks the Docker API and creates containers in containerd. Getting bind mounts right through that shim took four PRs
in a week. A couple of months later the version that worked…
