From 0e8d2884d646ba77cae5aaaef946b7ae87775e20 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 13 Feb 2017 15:03:00 +0100 Subject: [PATCH] Don't user user namespaces when bubblewrap is setuid It turns out that it is impossible for to get ptrace capabilities for child user namespaces in the current kernel if the user namespace is created as root, which is what happens when bwrap is setuid root (see https://github.com/flatpak/flatpak/issues/557 for details). This is very problematic, as ptrace rights controls access to /proc/$pid/root which is what we base the detection of peer app id and rights on for portals. For now, we disable user namespaces (except for the case of unprivileged user namespaces, where it is necessary and works). (cherry picked from commit 521e7e6a37d719002240426ca28aba43234a68df) --- common/flatpak-run.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 2405c1f62..045dbe4f5 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -3910,7 +3910,6 @@ flatpak_run_setup_base_argv (GPtrArray *argv_array, add_args (argv_array, "--unshare-pid", - "--unshare-user-try", "--proc", "/proc", "--dir", "/tmp", "--dir", "/var/tmp",