mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1347] Implications of CONFIG_USER_NS #925
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#925
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Jun 24, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1347
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
@ghost commented on GitHub (Jun 24, 2017):
When you run firejail with kernel that has disabled
CONFIG_USER_NSit won't use them and you lose this security feature.The problem with
CONFIG_USER_NSis that it can be tricked to gain local root by the normal user and that's why it is disabled on Archlinux. As I know that "debate" was closed and enablingCONFIG_USER_NSin Arch won't happen.However there is easy and secure solution to this. You can patch kernel to enable
CONFIG_USER_NSonly for privileged users (root). As firejail run always as root it will be able to useCONFIG_USER_NSnormally.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.
@netblue30 commented on GitHub (Jun 24, 2017):
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.
@curiosity-seeker commented on GitHub (Jun 25, 2017):
@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.
@Ferroin commented on GitHub (Jun 26, 2017):
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:
unamecommand and it's various other incarnations. AFAIK, almost nothing except container software uses these.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.
@curiosity-seeker commented on GitHub (Jun 26, 2017):
@Ferroin : Thanks, that's very instructive! Perhaps @netblue30 can add the missing details.
@netblue30 commented on GitHub (Jun 27, 2017):
I'll try to put in a description.
@ghost commented on GitHub (Jun 29, 2017):
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.
@polyzen commented on GitHub (May 28, 2018):
Referencing https://github.com/netblue30/firejail/issues/1842#issuecomment-376642039
@chiraag-nataraj commented on GitHub (May 23, 2019):
I'll close this for now. @glitsj16, feel free to re-open if you have more questions.