mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1441] Whitelist isn't really a whitelist...? #975
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#975
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 @taoeffect on GitHub (Aug 8, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1441
I've been reading the docs and the man pages, as well as the issues, and it's starting to dawn on me that there seems to be confusion about what
whitelistis/does.For an illustrative example, see issue #354, and comments within it like this one.
In infosec, a whitelist has a very specific meaning, and its meaning is mutually exclusive from a blacklist. In other words, both cannot exist at the same time, as the words represent two opposite approaches.
I.e. in this GitHub issue field, to protect against XSS attacks, GitHub can either attempt to blacklist certain symbols to sanitize input, or it can whitelist the allowed HTML tags.
Whitelisting is always considered the more secure approach, because it eliminates all possibilities except those explicitly allowed.
However, the firejail online docs clearly indicate that this isn't how how the application is using the term "whitelist":
So the docs, and the term itself, are not clear. The words "whitelist" and "blacklist" can appear in profiles simultaneously, and therefore it's not clear what exactly the purpose of the
whitelistkeyword is.From my reading it seems to have more to do with allowing changes to be persisted than the security notion of building a whitelist. So perhaps it should be renamed to
persist?@ghost commented on GitHub (Aug 8, 2017):
It's what you described at first. When using
whitelisteverything else under top directory of your whitelist path is automatically blacklisted. Keep in mind thatwhitelistsupports only user$HOME, /dev, /media, /mnt, /opt, /srv, /var, and /tmptop directories and each one is independent of others.So whitelisting
/tmp/aaablacklist everything inside/tmpexceptaaabut everything under/optwill be still accesible. This way you can combinewhitelistandblacklistamong different top directories.@taoeffect commented on GitHub (Aug 8, 2017):
Woah. Is that written somewhere or did I just miss it? Seems like critically important info to understand how to use this software!
@ghost commented on GitHub (Aug 8, 2017):
You can deduce it from the way it works (by
mount --bind) described on manpage, which excerpt is also posted in one of your links.@taoeffect commented on GitHub (Aug 8, 2017):
Hmm, I see, thanks so much @VladimirSchowalter20!
Perhaps I should leave this issue open still as a documentation improvement request?
For example, it's not clear from the website or man pages how these two commands interact with each other.
I.e. it would be great if:
I really liked a paragraph I saw somewhere on the website, something about the authors not believing that security and usability were at odds, but rather they were both essential to each other. This issue, I think, is something where that could better explained / made more usable / clearer, so that users don't accidentally shoot themselves in the foot by assuming something that isn't true.
@ghost commented on GitHub (Aug 9, 2017):
Yeah, it would be nice to have wiki here on github with detailed explanations with examples but it's a lot of work someone would need to do.
@h1z1 commented on GitHub (Aug 19, 2017):
@taoeffect : White and black lists are not by default mutually exclusive and can coexist .. even in infosec. You can have mutually exclusive or inheritance and the priority varies by application. Typically in security the default policy should be deny all for example but isn't guaranteed.
A more open, public facing mail server for example may accept all but which is denied whereas a private one would deny all first, thus whitelist-only. There may even be an implicit policy.
Nothing is perfect though, Firejail cannot ensure drop/deny all. Classic example is X and DBUS or firefox using shared memory between instances. It looks like your browser is isolated until you bring up a file list. Firejail's default policies are a weee too lax for me. I'd much rather have deny and yes crashing is OK, vs the current maintaining and excluding profiles for everything. Most of which I don't have anyway. Glad the option is there though :)
@netblue30 commented on GitHub (Sep 2, 2017):
I'll put in some more documentation, thanks.