3 ms·
> Mount namespaces and user namespaces have been a ripe area for Linux exploits. If you disable user namespaces, then only privileged users can create mount na
by cyphar 10y ago
> Mount namespaces and user namespaces have been a ripe area for Linux exploits.
If you disable user namespaces, then only privileged users can create mount namespaces. The rest of your tirade about namespaces is based on a misunderstanding of how namespaces are privilege separated.
> seccomp doesn't save containers. It has zero to do with containers. It's a simple mechanism to limit syscalls by syscall number.
... There is also seccomp-bpf -- which allows you to write proper filters for syscalls. Which makes the statement "simple mechanism" wildly inaccurate.
> Regarding PID namespacing and signaling, that's just FUD about chroot jails.
I note that you ignored my mention that most chroot jails have to mount /proc (and other filesystems that you seem to think are somehow dangerous), and also that networking isn't namespaced with chroot. Isn't that funny.
chroot was a very clever hack made by Bill Joy to be able to compile 4.2 BSD on a 4.1 BSD machine. Pretending that it's a genius security measure is just being disingenuous. BSD Jails, Solaris Zones and Linux Containers are all extensions of the base idea (lying to processes) -- but it's really quite silly to pretend that chroot is somehow superior to more modern operating system virtualisation systems because it's _simpler_.
- moonfern 10y agoYou can setup network namespaces with ip netns and then start your chroot with ip netns exec.
- cyphar 10y agoOf course you can. Which means that you're using container primitives with chroot. Which is fine, but if you're going to do that I would recommend using pivot_root and mount namespaces -- which are more secure because there simply is no mapping above / in your namespace (chroot doesn't do this but pivot_root does). This means that there is no way in the VFS layer for you to resolve paths above your root (unless someone bindmounts something in or similar).