mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6225] chromium: does not open unless ignoring whitelist-runuser-common.inc (hyprland) #3228
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#3228
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 @variasdesign on GitHub (Feb 27, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6225
Description
Hello. I'm trying to troubleshoot why Chromium was crashing with no apparent reason. Since launching chrome from the terminal didn't print any errors, I started trying ignore directives in my chromium-common.local, I arrived to ignore include whitelist-runuser-common.inc, which lets Chromium open normally.
What exactly happens in whitelist-runuser-common.inc? When ignoring it, I get a bunch of errors
Failed to connect to the bus: Failed to connect to socket /run/firejail/mnt/dbus/system: Permission denied, but otherwise I can open chromium. Thanks for any help.Steps to Reproduce
Steps to reproduce the behavior
LC_ALL=C firejail chromium(LC_ALL=Cto get a consistentoutput in English that can be understood by everybody)
Expected behavior
Chromium opens
Actual behavior
Chromium crashes
Behavior without a profile
Opens without problems
Additional context
Also running AppArmor. Fresh Arch install running Hyprland.
Environment
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/programOutput of LC_ALL=C firejail --debug /path/to/program
@ghost commented on GitHub (Feb 27, 2024):
FYI: be careful when running firejail like this. The above warning shows you used
firecfg, which placed a symlink in /usr/local/bin/chromium pointing to /usr/bin/firejail for easy desktop integration. Try to avoid thisdoubled sandboxingby making a habit out of usingfirejail /full/path/to/executableinstead.@variasdesign commented on GitHub (Feb 27, 2024):
Whoops, sorry about that. I usually run the applications by their symlink, I just blindly copypasted the troubleshoot commands. The problem persists, though. Thanks for the heads-up.
@ghost commented on GitHub (Apr 15, 2024):
whitelist-runuser-common.inc currently takes care of whitelisting what's needed for traditional X11 and Wayland. Looks like
Hyprlandneeds additional path(s) whitelisted. Can you determine what paths it creates in/run/user/$UID?@variasdesign commented on GitHub (Apr 15, 2024):
I'm not really sure, but it seems it doesn't create anything inside
/run/user/$UID. Here is my/run/user/$UID:It does, however, create a session directory inside
/tmp/hypr:Containing two sockets and a log.
Thanks for your help.
@ghost commented on GitHub (Apr 15, 2024):
@variasdesign
Thanks for the
/run/user/$UIDoutput. Not sure (yet) why it works when you ignore including whitelist-runuser-common.inc (wruc), this is my first encounter withhyprland. As you've noticed, we have zero support for Hyprland in Firejail currently, so until that changes you'll need to keep 'wruc' out of the chromium profiles. There might be other apps that need similar treatment.Its sockets use is documented: https://wiki.hyprland.org/IPC/. And I understood that
/usr/share/hyprlandcontains its configuration defaults, besides per-user~/.config/hypr. You might want to protect those paths for now in a globals.local, although it's too early for me to give sound and tested advice on Hyprland...@variasdesign commented on GitHub (Apr 15, 2024):
Thanks for the pointers. Poking around
/run/user/$UID, I noticed thepsddirectory, which is created by profile-sync-daemon. The daemon mounts a tmpfs directory to speed up browser performance. I just needed towhitelist ${RUNUSER}/psdand it works now. I didn't notice until now because Firefox, which is my main browser, apparently works without any problems whatsoever without whitelistingpsd.How would I go about protecting those paths? Thank you.
@ghost commented on GitHub (Apr 15, 2024):
How would I go about protecting those paths?
Most of the profiles include
globals.localto offer users a way to override options. So in this context you can blacklist the relevant paths in such a file:That should keep these inaccessible in sandboxes.
@variasdesign commented on GitHub (Apr 15, 2024):
Thanks for the help. I've just applied the aforementioned config. Conversely, do you think I should blacklist the
/tmp/hyprdirectory too? I don't have use for the sockets, at least for now.@ghost commented on GitHub (Apr 15, 2024):
Very welcome. I didn't want to suggest blacklisting those hyprland sockets because I don't know how that will affect Hyprland. But if you don't experience any negative effects doing so, sure, you can add that to the globals.local too. In case something breaks, there's always the option of adding the counterpart
noblacklist /tmp/hyprto another foo.local. This replicates the way Firejail internally works, on a per-user basis under ~/.config/firejail and system-wide under /etc/firejail.HTH