Skip to content
Permalink
Browse files Browse the repository at this point in the history
run: Block setns()
If we don't allow unshare() or clone() with CLONE_NEWUSER, we also
shouldn't allow joining an existing (but different) namespace.

Partially fixes GHSA-67h7-w3jq-vh4q.

Signed-off-by: Simon McVittie <smcv@collabora.com>
  • Loading branch information
smcv authored and alexlarsson committed Oct 8, 2021
1 parent 9766ee0 commit 4c34815
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/flatpak-run.c
Expand Up @@ -2932,6 +2932,7 @@ setup_seccomp (FlatpakBwrap *bwrap,

/* Don't allow subnamespace setups: */
{SCMP_SYS (unshare), EPERM},
{SCMP_SYS (setns), EPERM},
{SCMP_SYS (mount), EPERM},
{SCMP_SYS (pivot_root), EPERM},
#if defined(__s390__) || defined(__s390x__) || defined(__CRIS__)
Expand Down

0 comments on commit 4c34815

Please sign in to comment.