Open purplesyringa opened 4 years ago
Generally speaking there is a problem if a privileged tool trusts a path, but permissions on this path are not adequate. Or the trusted file can be modified in another way, for example by mounting another file on top. This can happen if
By dropping all capabilities (and always setting the NO_NEW_PRIVS bit, which we also do), we effectively remove this attack surface. Maybe this could be made optional in the Firejail configuration file, but there probably should be a warning attached to it.
I am afraid that the current situation is even worse than allowing --caps.keep
, because it's easier for a user to root-suid a tool (with possible security implications) than to patch firejail or add a launch script to the jail (and even then, it's easy to forget to drop some capabilities or such which are already handled by firejail
itself). Hopefully we'll be able to use --caps.keep
soon.
I have a
chroot
environment with/bin/ping
binary. The binary is non-suid but hascap_net_raw+eip
capability. Unfortunately, runningping
doesn't work insidefirejail
:This is expected because all Linux capabilities are dropped. Whitelisting
net_raw
yields the following error:I know that running
firejail
asroot
, then dropping other capabilities and changing uid inside the jail is going to work, but I think a simpler solution should exist. What would be the security implications of allowing--caps.keep
with--chroot
?