Making containers safer
Making containers safer
Posted Aug 22, 2019 13:02 UTC (Thu) by cyphar (subscriber, #110703)In reply to: Making containers safer by rc
Parent article: Making containers safer
Not using security features is not a form of "principle of least privilege", it's an example of worrisome (if not outright bad) engineering.
> And yes, I agree with others who are concerned about the increased kernel attack surface of user namespaces.
The attack surface is increased by setting CONFIG_USER_NS=y in your kernel config. Using them to contain workloads on a machine that has CONFIG_USER_NS=y does not increase the attack surface, because even if you don't use them the container could call unshare(CLONE_NEWUSER) itself. In addition, most container runtimes block CLONE_NEWUSER with seccomp by default.
