-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User namespaces not used? #11
Comments
Hello @xmikos, Sorry for the late reply, as this was not an actual bug it was low on my priority list. This is however a question we get quite often. First off the code and comment you are referring to is only related to opening of existing namespaces and not the actual sandbox/namespace handling. That comment refers to a property of these two namespaces which indeed cannot be entered from Golang as they must be entered from single threaded programs. However as you can see elsewhere in the project this can be worked around easily by using a C based constructor function (as used for
We are however indeed not using the user namespace. This is not an omission and not because of this Golang/Namespace limitation but because we do not believe the user namespace to actually provide any security benefits in a single user context. In fact it may actually lower security by giving extra capabilities to unprivileged users. Moreover preparations necessary to bring up a sandbox (such as network handling) would still require root or extra capabilities. This is often handled by giving the program root suid (such as ChromeOS' minijail) which we decided against in preference of the daemon/client model. Sandboxes in OZ do not allow root at all (to the exception of a debugging flag). And while it is true that root in a user namespace has slightly less capabilities than root outside of the sandbox, it is a false sense of security to believe that is not highly capable of being damaging outside of the sandbox. This is all demonstrated by the fact that almost every single namespace escape security vulnerability so far has been related to the user namespace:
To name only a few. As such we do plan to add this "feature" to OZ. Bests. |
https://lwn.net/Articles/673613/
|
And again: http://openwall.com/lists/oss-security/2017/03/29/2
|
DoS accessible via unpriv CAP_NET_RAW: http://seclists.org/oss-sec/2017/q1/697 |
Hello, your project looks great, but I have looked at your code and found this which concerns me:
Am I right that you are not using user namespaces? Just because some limitation of Go language?This seems really insecure, unprivileged containers (user namespaces) seems like the only way how to make containers really secure (without it, root in container is like root on host system... at least this is what I have read about it, you can harden it with SELinux/AppArmor or other MAC, but it is still not that secure as user namespaces).
Are you planning to fix this? Or did I overlooked something?
The text was updated successfully, but these errors were encountered: