mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6213] Disable force-nonewprivs on a per-profile basis #3225
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#3225
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 @ShellCode33 on GitHub (Feb 17, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6213
Is your feature request related to a problem? Please describe.
force-nonewprivsis set toyesin my/etc/firejail/firejail.configbut this breaks Electron apps such as signal-desktop which rely on the chromium sandbox setuid binary.For now I pass
--no-sandboxto Electron apps, but it is not ideal.Describe the solution you'd like
I wish I could leave
force-nonewprivstoyesas a default but still allow it on a per-profile basis.I do realize it would be kind of odd because it wouldn't be "forced" anymore, but I'd like to configure firejail in a way that "what is not explicitly allowed is forbidden".
@rusty-snake commented on GitHub (Feb 17, 2024):
The hole idea behind
force-nonewprivsis that you can not unset it as unprivileged user. This prevents all kinds of vulnerabilities that could happen when suid program is executed in a malicious environment that was created with the privileges of firejail.@ShellCode33 commented on GitHub (Feb 17, 2024):
I do realize that, and that's great.
That's precisely why I want
force-nonewprivs yes, yet I think it would make sense to provide a way to whitelist some profiles, maybe something like this:It would still be something that cannot be unset by an unprivileged user.
@rusty-snake commented on GitHub (Feb 17, 2024):
Don't do that.
The Chromium/Electron sandbox is far superior to that of firejail.
Only if unprivileged user namespaces are disabled.
Also this is not limited to
nonewprivs. If you rely on the suid sandbox of Chromium, you can not usecaps.*,nonewprivs,noroot,protocol,seccomp*orrestrict-namespaces.Use
globals.localyou can deny-by-default much more than you can fromfirejail.config.@rusty-snake commented on GitHub (Feb 17, 2024):
And what stops me from running
firejail --include=./malicious.include --profile=signal-desktop /usr/bin/vulernable-suid?@ShellCode33 commented on GitHub (Feb 17, 2024):
They are, as I use the Linux kernel from GrapheneOS.
Good to know, so maybe I will disable firejail for this profile instead.
But then it doesn't fix the fact that a user can unset it... Maybe that's acceptable in my context though, I will think about it.
Right... I didn't realize that
Thanks for your replies!
@rusty-snake commented on GitHub (Feb 17, 2024):
OT: It is available for desktop?
@ShellCode33 commented on GitHub (Feb 17, 2024):
Yes it is: https://github.com/anthraxx/linux-hardened
If you're running Arch it's as simple as
pacman -S linux-hardened@ghost commented on GitHub (Feb 17, 2024):
FYI: you could add
nonewprivsto aglobals.localand simplyignore nonewprivsin those profiles you want to override it. Not a 100% similarity with force-nonewprivs, but (on a single-user machine) close enough IMO.@ShellCode33 commented on GitHub (Feb 18, 2024):
Works like a charm, thanks ! What are the differences with force-nonewprivs ? (except the fact that it can be overridden by unprivileged users, which is not an issue in my case)
@ghost commented on GitHub (Feb 18, 2024):
That's the only difference. Functionality-wise the same sandbox is built for the app to run in.