mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #386] Whitelisting doesn't work if whitelisted path is a symlink #277
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#277
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 @n1trux on GitHub (Mar 26, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/386
error is:
@netblue30 commented on GitHub (Mar 26, 2016):
I guess I should allow this type of functionality. Let me think about it, thanks!
@tobykurien commented on GitHub (Mar 31, 2016):
+1 - worked with older versions (in Ubuntu) but stopped working on current version
@liloman commented on GitHub (Apr 23, 2016):
Same here.
I can't access .mplayer path from firefox cause It's a symlink to my dotfiles.
Even more I think I can't blacklist /bin -> /usr/bin from firefox for the very same reason and private-bin is not working either...
@sciamano commented on GitHub (Jun 14, 2016):
I have the issue too: my
.cacheis symlinked to/dev/shm/unburden-username/cacheusingunburden-home-dirand the default FF profile from/etc/firejail/firefox.profileleads toError: invalid whitelist path /home/username/.cache/mozilla/firefoxPS: using version from debian testing
@netblue30 commented on GitHub (Jun 14, 2016):
I think I will have to drop this enhancement. I cannot allow symlinks from /home/user and from /tmp directories. There will be tones of security problems related to SUID binary. The safe thing for now is to wait, maybe somebody comes up with an idea how this can be done safely.
@liloman commented on GitHub (Jun 19, 2016):
So which do you think will be the solution for those using symlinks?
Hardlinks? (if the same partition)
I have to do something with this issue for sure cause the .mplayer issue is rather cumbersome for me (but how there isn't audio yet it is really not important cause I stopped launching mplayer/youtube-dl from the brower, bothersome but "temporal" till fixed the sound issue). ;)
@netblue30 commented on GitHub (Jun 20, 2016):
I don't know, maybe I can allow it on Grsecurity systems. It is really a kernel problem, never recognized as such by the kernel people.
@liloman commented on GitHub (Jun 22, 2016):
They are starting to implement grsecurity now... so who knows? 💃
What about checking for symlinks and using readlink to point to the target dir? It would be a userspace solution and Torvalds would be pretty happy about that. ;)
@netblue30 commented on GitHub (Jul 12, 2016):
Whitelisting symlinks outside user home directory is implemented.
@liloman commented on GitHub (Jul 20, 2016):
Awesome man. :)
I just figured it out right now.
Nice!
@bitnom commented on GitHub (Jul 22, 2018):
Not working for me. Using 0.9.54
@Linux-Fan commented on GitHub (Feb 22, 2020):
@cjsthompson commented on GitHub (Feb 27, 2020):
Same problem here (Arch Linux x86-64, apparmor enabled). Firefox will start but I'll get an error message that I can't save my downloads to ~/Downloads which is a symlink to a downloads folder on another btrfs subvolume.
@ghost commented on GitHub (Feb 27, 2020):
@cjsthompson Where exactly is that other btrfs subvolume mounted? Keep in mind that /etc/firejail/firefox-common.profile uses
disable-mnt, so that will block access to /mnt, /media, /run/mount and /run/media. You will have to explicitly grant access to the symlinked downloads folder.@cjsthompson commented on GitHub (Feb 27, 2020):
It's mounted on /data and chown -R ~user.~user and chmod -R 0750.
@ghost commented on GitHub (Feb 27, 2020):
@cjsthompson Have you tried adding
whitelist /datato a firefox-common.local file yet?@cjsthompson commented on GitHub (Feb 27, 2020):
Not a firefox-common.local but the /etc/firejail/whitelist-common.local and when I do that, then firefox won't start at all with "invalid whitelist path".
@Vincent43 commented on GitHub (Feb 28, 2020):
/data is unusual path. Maybe you could use /mnt or /media ?
@cjsthompson commented on GitHub (Mar 6, 2020):
I found the problem. It's in /etc/apparmor.d/firejail-default :
Adding /data to this list fixes the problem. Perhaps it would be useful to mention this somewhere.
@Vincent43 commented on GitHub (Mar 6, 2020):
You may add local apparmor modifications to
/etc/apparmor.d/local/firejail-{default,local}like:/data/** w,@cjsthompson commented on GitHub (Mar 6, 2020):
That's indeed even better. Thanks for the tip.