Skip to content

Commit

Permalink
run: Don't allow chroot()
Browse files Browse the repository at this point in the history
If we don't allow pivot_root() then there seems no reason why we should
allow chroot().

Partially fixes GHSA-67h7-w3jq-vh4q.

Signed-off-by: Simon McVittie <[email protected]>
(cherry picked from commit 8f87696)
  • Loading branch information
smcv authored and debarshiray committed Jan 27, 2022
1 parent b3072a1 commit 26e226e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/flatpak-run.c
Original file line number Diff line number Diff line change
Expand Up @@ -2624,6 +2624,7 @@ setup_seccomp (FlatpakBwrap *bwrap,
{SCMP_SYS (umount), EPERM},
{SCMP_SYS (umount2), EPERM},
{SCMP_SYS (pivot_root), EPERM},
{SCMP_SYS (chroot), EPERM},
#if defined(__s390__) || defined(__s390x__) || defined(__CRIS__)
/* Architectures with CONFIG_CLONE_BACKWARDS2: the child stack
* and flags arguments are reversed so the flags come second */
Expand Down

0 comments on commit 26e226e

Please sign in to comment.