How can we make procfs safe?
summary
Claim: use the new mount API to make procfs-safe resolution for container setup by combining open_tree clone to create a detached anonymous mount, verification (fstat for proc fs type and inode, check mount root) and openat2 for non-magic paths; this avoids races and overmount attacks on magic links. Implementation prototypes include a Rust library lippathos and a test tool (emoji); it works today but depends on kernel guarantees (CAP_SYS_ADMIN, mount propagation and anonymous-namespace behavior).
AI-written summary · about
chapters (9)
- 0:00Introduction and threat model
- 1:23Container breakout attacks via procfs
- 3:30Magic links and openat2 limitations
- 5:34Open tree and safe procfs access
- 12:15Recap of openat2 and libpathrs
- 16:26Libpathrs design and safety goals
- 20:40Implementation challenges and future plans
- 28:09Procfs in container runtimes
- 34:07Q&A and discussion
related talks
30mPathless First: Redefining Runc Container Security Against ProcFS-Based Attacks
19mFiles on Unmounted Mounts
29mFilesystem mounts in user namespaces
01h 03mLinux Namespaces for Fun and Isolation
45mContainer Kernel Development
42mSecuring Filesystem Images for Unprivileged Containers
57mNamespaces for Security
29mSecuring Container Runtimes -- How Hard Can It Be?
