mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6447] mkdir command works even when the path is blacklisted #3276
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#3276
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 @elde-n on GitHub (Aug 23, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6447
The mkdir command in a profile file bypasses nowhitelist and blacklist override
Example:
test.localtest.profile@rusty-snake commented on GitHub (Aug 23, 2024):
It does not bypass them because it can not "bypass" them. You can not protect firejail from firejail with firejail.
So what's going on
Firejail sees two commands, one asking to ignore any following
whitelist ${HOME}/testcommand. And one command asking to create a directory at${HOME}/test.One could say mkdir should respect a
nowhitelistlike it should for--private=(which has a bug and does not respect--private=). But see the next.Firejail sees two commands, one asking to blackist
${HOME}/testif it exists. And one command asking to create a directory at${HOME}/test.While this order isn't very useful, flipping these two lines can make a different between a sandbox escape and blocking it.
@elde-n commented on GitHub (Aug 23, 2024):
Well how would I avoid calling mkdir in a default profile?
For example the default neomutt profile creates 6 trash directories in the home directory that are never used on my system
@rusty-snake commented on GitHub (Aug 23, 2024):
Add
ignore mkdir <PATH>to yourneomutt.local.@elde-n commented on GitHub (Aug 23, 2024):
Thank you it's exactly what I was looking for!