-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only set DUMPABLE when we need it (i.e. in user namespace child)
Setting DUMPABLE in general for a setuid process is dangerous, because it allows other processes to ptrace it and control what it does. However, in the case of user namespaces, we need it to be set in the child process, as the parent need to modify the child uid maps which is not allowed if the process is !DUMPABLE (due to /proc permissions). This change makes us *only* set DUMPABLE in the case of --unshare-user and *only* inside the user namespace. This is generally safe, because in such a user namespace we don't have *any* capabilities in the parent user namespace. In fact any process from the parent user namespace have ptrace access anyway, due to parent ns having CAP_SYS_PTRACE (and all other caps) in the child ns. Closes: #110 Approved by: cgwalters
- Loading branch information
1 parent
f37abd1
commit 7d035f1
Showing
1 changed file
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters