Skip to content

Commit

Permalink
run: Don't allow unmounting filesystems
Browse files Browse the repository at this point in the history
If we don't allow mounting filesystems, we shouldn't allow unmounting
either.

Partially fixes GHSA-67h7-w3jq-vh4q.

Signed-off-by: Simon McVittie <[email protected]>
(cherry picked from commit 758b8ca)
  • Loading branch information
smcv authored and debarshiray committed Nov 2, 2021
1 parent 36094ca commit 5f5b4d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/flatpak-run.c
Original file line number Diff line number Diff line change
Expand Up @@ -2621,6 +2621,8 @@ setup_seccomp (FlatpakBwrap *bwrap,
{SCMP_SYS (unshare), EPERM},
{SCMP_SYS (setns), EPERM},
{SCMP_SYS (mount), EPERM},
{SCMP_SYS (umount), EPERM},
{SCMP_SYS (umount2), EPERM},
{SCMP_SYS (pivot_root), EPERM},
#if defined(__s390__) || defined(__s390x__) || defined(__CRIS__)
/* Architectures with CONFIG_CLONE_BACKWARDS2: the child stack
Expand Down

0 comments on commit 5f5b4d5

Please sign in to comment.