mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #712] Test for shell interpreter inside chroot is wrong #484
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#484
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 @nuxwin on GitHub (Aug 14, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/712
The current test for the shell availability inside the chroot (fs.c) is wrong, leading to the following error:
if the interpreter is not also present in the system fs.
Indeed, the test is made on the system fs (chroot() system call is done later on) while it should be done inside the chroot. A shell available inside the chroot can be missing in system fs (busybox ash case). There is also a pointer problem in the code (on error, (null) is showed instead of the cfg.shell value).
I'll do a PR soon.
@nuxwin commented on GitHub (Aug 14, 2016):
@netblue30
Note also that the check from main.c file for the shell access should be done only if the
--chrootoption is not defined. Doing this test here when the--chrootoption is used will result to:Even if the shell file is available in the chroot.
@nuxwin commented on GitHub (Aug 14, 2016):
@netblue30 I'll make a PR fixing issues reported here.
@nuxwin commented on GitHub (Aug 14, 2016):
@netblue30
See the referenced PR.
Summary
--chrootoption is used, test for shell access is made inside the chroot fs (there is no need to check on system fs since we have interest only to chroot fs)--chrootoption is not used, test for shell access is made on system fs