-
Notifications
You must be signed in to change notification settings - Fork 594
Implications of CONFIG_USER_NS #1347
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
Comments
When you run firejail with kernel that has disabled The problem with However there is easy and secure solution to this. You can patch kernel to enable You can add this patch to your custom kernel or use linux-hardened package which has it built-in. The same patch is used by defult for debian kernels. |
Good question! There are two different technologies you can use today to setup a sandbox: SUID and user namespaces. Quite funny, both of them are terribly insecure. User namespace has the advantage when things go wrong you can blame it on kernel people. For Firejail we use SUID, at least this one we can fix ourselves. However, we do use user namespace for a different purpose: to prevent the user from becoming root. But for this purpose we also have seccomp and capabilities. These three technologies overlap quite well, in a real world scenario it is difficult to tell which one will trigger first. You need at least one to do the job. I would say, if Arch developers keep user namespace disabled, it will have negligible impact on Firejail users. |
@netblue30 : Thanks, this is a very interesting answer which helps to understand how Firejail works. I know that your time is limited but it would be really great if you could summarize on your wordpress site (perhaps with a diagram or a spreadsheet) which technologies (e.g. which types of namespaces) are used to control what and how things interact with each other. |
You may want to look at how Chromium and Google Chrome handle sandboxing, as they also use either SUID or user namespaces to be able to handle the full plugin sandboxing. Generically though, you have:
Firejail uses the first three almost unconditionally. The independent networking stuff is done using net namespaces, and I'm not sure if it has code at all for UTS or user namespaces (although I think it doesn't. |
@Ferroin : Thanks, that's very instructive! Perhaps @netblue30 can add the missing details. |
I'll try to put in a description. |
Great to see so much detail being provided in the replies. Exactly what was hoped for! A big thank you to all who helped clearing up possible confusion. |
Referencing #1842 (comment) |
I'll close this for now. @glitsj16, feel free to re-open if you have more questions. |
Hi, there's a debate going on in the arch linux community as to start enabling CONFIG_USER_NS for default kernels. Not the first time this is being looked at. Currently this setting is explicitly not applied to arch repo's kernels (cfr. https://bugs.archlinux.org/task/36969).
Personally I use firejail on custom kernels anyway, and I've enabled user namespaces. Just wanted to clear up any possible confusion on this topic. Hence my question, what are the implications when running firejail on a kernel that doesn't have user namespaces, if any? Or, to put it differently, does this 'cripple' firejails ability to offer its security features in any respect? To be clear, I'm not officially related to archlinux, although I consider myself to be an interested community member. Any input you or others might have on this topic is very welcome.
All the best with this much needed and simply great project,
Regards
The text was updated successfully, but these errors were encountered: