The chroot-escapes-through-open-handles point is what sells pivot_root: chroot only changes where a process thinks root is, while the old root stays mounted and reachable, and pivot_root actually swaps the mount so the host tree can be unmounted. Isolation by removal beats isolation by redirection.
Abhinav Sharma
Founder of Impact Gate. See who breaks before you change an API.
The chroot-escapes-through-open-handles point is what sells pivot_root: chroot only changes where a process thinks root is, while the old root stays mounted and reachable, and pivot_root actually swaps the mount so the host tree can be unmounted. Isolation by removal beats isolation by redirection.