Replies: 2 comments 2 replies
-
paranoia and theater
Deny executing of arbitrary code / W^X. Interpreters that perform executability check can be removed in the future IMHO.
Enumerating badness will never produce a complete list. If you knew missing interpreters, open a PR and add them.
Shells are handled by
⬆️ paranoia and theater
Something you always want to block.
|
Beta Was this translation helpful? Give feedback.
-
In many cases the program itself does not need a shell at all, but in one or If the filename of the shell wrapper and the main program differ, then we can
I think the point of these includes is not about whether there technically
If you don't care about blocking interpreters and shells, you can just add the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've wondered if it's really helpful to block parts of
/usr/.Question: Which problem or threat model is counteracted by blocking
/usr/?Instead Firejail should maybe block additional directories where (writeable) userdata is stored.
Why stop blocking /usr
This includes questioning, why Firejail blocks many interpreters. Although not all interpreters.
bashfor example often isn't blocked.https://github.com/netblue30/firejail/blob/072c15b8bfc1eca0368071c3d798b29459686c04/etc/inc/disable-interpreters.inc
Some other examples of blocks below
/usr/which I'm questioning.disable-common.inc (line 229 and on-wards)
Badly behaving programs don't need
gcc, they could just include their own compiler.disable-devel.inc (line 68 and on-wards)
/usr/isn't writeable for anyone but root, so no need to discuss that. And usually/usr/contains only files publicly available from the Internet. So no information leakage possible when running without--net=none. (maybe except for/usr/local/)So then why block
/usr/? If a program is behaving really badly, it can just bring things like a Python interpreter itself. It only needs the possibility to create files and mark them executable.The only thing that came to my mind, to block parts of
/usr/, are setuid binaries in/usr/. JUST MAYBE a Linux distribution could ship some setuid binary which allows escaping a sandbox by using root permissions. At least if that's possible for root. But I know of none such binary shipped under/usr/by common Linux distributions.I've just had a time consuming issue, where Wine was missing
/usr/bin/python3*.Block (writeable) userdata instead
Instead I'm proposing, to block more directories containing writeable userdata.
At least from my perspective, a main reason for using Firejail is, to ensure badly behaving programs can't leak, modify or delete user data. Because of that, I'd additionally block access to this directories (or put empty mounts there) for most profiles:
/tmp/# --private-tmp/srv/# for example data you might want to server to HTTP authorized users, but not to anyone/var/# may contain a lot of private data like all kinds of long living/var/tmpfiles (/tmp/is for short lived ones), mails, .../run/# except for /run/resolvconf and the sockets of X11, Wayland, Pulseaudio and PipewireHere's an issue which handles this topic in detail:
I'd not use
--private-devand block/opt/in general, as described in that issue.Relates to:
Beta Was this translation helpful? Give feedback.
All reactions