mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3567] Can't exec ping inside chroot #2237
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#2237
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 @purplesyringa on GitHub (Aug 3, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3567
I have a
chrootenvironment with/bin/pingbinary. The binary is non-suid but hascap_net_raw+eipcapability. Unfortunately, runningpingdoesn't work insidefirejail:This is expected because all Linux capabilities are dropped. Whitelisting
net_rawyields the following error:I know that running
firejailasroot, 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.keepwith--chroot?@smitsohu commented on GitHub (Aug 3, 2020):
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.
@purplesyringa commented on GitHub (Aug 3, 2020):
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 byfirejailitself). Hopefully we'll be able to use--caps.keepsoon.