mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #471] Can access children of blacklisted directories by moving directories around outside jail #335
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#335
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 @ivan on GitHub (Apr 22, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/471
Not sure if this is fixable. Repro steps (tested with firejail 0.9.38) are:
Outside the jail:
Inside the jail:
Outside the jail:
Inside the jail:
And the jail now has full access to
$HOME/secret/childeven though$HOME/secretis blacklisted.I discovered this when I moved some folders around and accidentally exposed all my stuff to the jail.
@Fred-Barclay commented on GitHub (Apr 22, 2016):
Interesting! I can confirm that this also occurs on the current code (just built from source 5 minutes ago), firejail 0.9.40~rc2.
The good news is, that even though firejail has access to
/home/secret/child/stuffand/home/secret/child, it cannotcd ..into/home/secret--the blacklist still stands. At least, I haven't been able to get it to yet.I can see how this could be a problem if you have a secret directory inside another secret directory, and then only blacklist the exterior directory.
Interestingly, if you cd outside the secret directory, you then cannot cd back in:
Let's say that I have ~/.gnupg/supersecretdir, with a very important file inside. If I attempt to access it directly from a firejail shell, it's denied. However, following the steps that ivan has detailed, it's easy to read the file:
Move
attackto ~/.gnupg/supresecretdir nowPerhaps interestingly, even after
attackhas been moved to .gnupg/supersecretdir, it doesn't seem to be aware of its new location. It's only aftercd ..thatpwdgives the correct location:I can even write inside supersecretdir:
@netblue30 commented on GitHub (Apr 22, 2016):
It is like a real jail, you can sabotage it from outside. I don't think we can do anything about it.