mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5338] No access to /tmp if blacklisted paths symlink to it #2964
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#2964
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 @birdie-github on GitHub (Aug 23, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5338
firejail-0.9.66-3.fc36.x86_64
Relevant debug strings:
This is Fedora 36 with a custom kernel.
I am confused. The documentation makes it look like
/tmpmust be available.@birdie-github commented on GitHub (Aug 23, 2022):
--noprofilewith or without--private-tmpworks:@kmk3 commented on GitHub (Aug 23, 2022):
@birdie-github commented on Aug 23:
That version is from over a year ago and is unsupported by us:
Does it happen with 0.9.70 or with the version from master?
I cannot reproduce this on Artix with the current master:
@birdie-github commented on GitHub (Aug 24, 2022):
I've compiled version 0.9.70, the issue persists:
@rusty-snake commented on GitHub (Aug 28, 2022):
Remove this symlinks.
${HOME}/.cache/{mozilla,thunderbird}areblacklisted by disabled programs.inc which isincluded in default.profile. Andblacklistfollows symlinks.If you want them to be in a tmpfs, you can use firejail's
private-cachefeature or symlink them to somewhere in /tmp but not /tmp itself (which is risky anyway I guess) and have a look at systemd-tempfiles.@birdie-github commented on GitHub (Aug 28, 2022):
Without these symlinks this issue is gone but I'd love to leave everything as is.
Looks like I'll be removing these two rules from
/etc/firejail/disable-programs.inc. I don't particular care if rogue applications could access my Firefox/Thunderbird cache directories. I have disk cache completely disabled anyways and these two directories are almost empty.@birdie-github commented on GitHub (Aug 28, 2022):
Still it would be great if firejail were a tad more verbose when it detects problems like this.
/tmpis such an integral part of Linux it must say something like,I guess it could be fixed in a few lines of code. Yes, this is verbose but it will spare a ton of time for users.
@rusty-snake commented on GitHub (Aug 28, 2022):
Firejail does what you ask it for:
~/.cache/mozilla~/.cache/mozillais found at/tmp.We are already to complex. This should be added to firejail. If, we could develop a
firelintprogram which analyzes profiles and gives recommendations.This can be said about D-Bus, X11, ... as well.
@kmk3 commented on GitHub (Aug 28, 2022):
@birdie-github commented on Aug 28:
Note that there is also
private-cache, which mounts a tmpfs directory at~/.cache.
So it could be added to firefox-common.local and chromium-common.local.
Does it work with disable-programs.inc as is +
private-cache?By the way, the rules can also be ignored by adding the following commands to
~/.config/firejail/disable-programs.local:
@birdie-github commented on GitHub (Aug 28, 2022):
This works:
@kmk3 commented on GitHub (Aug 29, 2022):
I see now that
/tmpis still blacklisted even withprivate-cache:To avoid issues with
/tmp, I'd suggest symlinking such a directory to a morespecific path, such as
${XDG_RUNTIME_DIR}/.cache/mozilla(
${XDG_RUNTIME_DIR}is also tmpfs on basically every distro AFAIK).Note that the target directory usually does not even have to exist before
running the program (and definitely not if
private-cacheis used).Example:
And when using symlinks in this way, I'd also suggest blacklisting the target
paths (especially if not using
private-cache). For example, by adding thefollowing to ~/.config/firejail/disable-programs.local:
@rusty-snake commented on GitHub (Aug 29, 2022):
Unlike /tmp it is required to be so IIRC.
@kmk3 commented on GitHub (Sep 6, 2022):
In summary, firejail is working as intended and a workaround for the reported
issue was provided.
Closing this since there hasn't been any more activity.
Feel free to post updates and to request to reopen if you have more questions.