mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2985] Problems with chroot and user namespaces #1869
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#1869
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 @zb3 on GitHub (Oct 2, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2985
Firejail uses
chroot()when mounting overlayfs and when using the--chrootoption. But usingchroot()prevents the sandboxed process from being able to create user namespaces. So whileworks,
doesn't, because firejail uses
chroot, and the sandboxed process can't create user namespaces anymore.Similarily, chromium without SUID sandbox (which will be removed in the future) doesn't work:
Could
pivot_root()be used instead? Other sandbox programs use it instead ofchroot, and since it updates current mount namespace root, sandboxed programs can still create their own user namespaces.pivot_rootrequires that at least:Here's a PoC patch I've made to check whether
pivot_rootcan work here. While I gotunshare -Uandchromium --disable-setuid-sandboxto work with--overlay-tmpfs, I have no idea what other side effects this introduces (and whether firejail even works beyond these simple use cases), so I'll just drop this here:@netblue30 commented on GitHub (Nov 5, 2019):
Thanks for the patch. I'll grab it after we release the current version. There will be some more work there,