From: "Serge E. Hallyn" <serge@hallyn.com>
To: Tobias Markus <tobias@miglix.eu>
Cc: linux-kernel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Al Viro <viro@ZenIV.linux.org.uk>,
Serge Hallyn <serge.hallyn@canonical.com>,
Andrew Morton <akpm@linuxfoundation.org>,
Andy Lutomirski <luto@amacapital.net>,
Christoph Lameter <cl@linux.com>,
"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
linux-security-module@vger.kernel.org, linux-api@vger.kernel.org,
linux-man@vger.kernel.org
Subject: Re: [PATCH] userns/capability: Add user namespace capability
Date: Sat, 17 Oct 2015 16:55:01 -0500 [thread overview]
Message-ID: <20151017215501.GA22900@mail.hallyn.com> (raw)
In-Reply-To: <5622700C.9090107@miglix.eu>
On Sat, Oct 17, 2015 at 05:58:04PM +0200, Tobias Markus wrote:
> Add capability CAP_SYS_USER_NS.
> Tasks having CAP_SYS_USER_NS are allowed to create a new user namespace
> when calling clone or unshare with CLONE_NEWUSER.
>
> Rationale:
>
> Linux 3.8 saw the introduction of unpriviledged user namespaces,
> allowing unpriviledged users (without CAP_SYS_ADMIN) to be a "fake" root
> inside a separate user namespace. Before that, any namespace creation
> required CAP_SYS_ADMIN (or, in practice, the user had to be root).
> Unfortunately, there have been some security-relevant bugs in the
> meantime. Because of the fairly complex nature of user namespaces, it is
> reasonable to say that future vulnerabilties can not be excluded. Some
> distributions even wholly disable user namespaces because of this.
Fwiw I'm not in favor of this. Debian has a patch (I believe the one
I originally wrote for Ubuntu but which Ubuntu dropped long ago) adding a
sysctl, off by default, for enabling user namespaces.
Posix capabilities are intended for privileged actions, not for
actions which explicitly should not require privilege, but which
we feel are in development.
In general, the feeling is that putting a feature like this behind a
wall will only slow down the finding of any bugs, so I think the goal
itself is questionable. But the chosen means for achieving your goal
are definately wrong.
> Both options, user namespaces with and without CAP_SYS_ADMIN, can be
> said to represent the extreme end of the spectrum. In practice, there is
> no reason for every process to have the abilitiy to create user
> namespaces. Indeed, only very few and specialized programs require user
There is. One of Eric's primary motivations for user namespaces was to
finally allow unprivileged users to safely do things like manipulate
their mounts tree without the risk of privileged (setuid) programs
being tricked.
-serge
next prev parent reply other threads:[~2015-10-17 21:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 15:58 Tobias Markus
2015-10-17 20:17 ` Richard Weinberger
2015-10-18 20:13 ` Tobias Markus
2015-10-18 20:21 ` Richard Weinberger
2015-10-18 20:41 ` Tobias Markus
2015-10-18 20:48 ` Richard Weinberger
2015-10-18 21:49 ` Tobias Markus
2015-10-18 22:06 ` Richard Weinberger
2015-10-19 0:28 ` Mike Frysinger
2015-10-17 21:55 ` Serge E. Hallyn [this message]
2015-10-18 20:13 ` Tobias Markus
2015-10-19 1:41 ` Serge E. Hallyn
2015-10-19 12:36 ` Yves-Alexis Perez
2015-10-19 12:48 ` Richard Weinberger
2015-10-22 20:45 ` Eric W. Biederman
2015-10-22 21:02 ` Andy Lutomirski
2015-10-22 21:44 ` Eric W. Biederman
2015-10-19 14:24 ` Austin S Hemmelgarn
2015-10-21 18:53 ` Andy Lutomirski
2015-10-21 19:13 ` Austin S Hemmelgarn
2015-10-22 17:10 ` Andy Lutomirski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151017215501.GA22900@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=akpm@linuxfoundation.org \
--cc=cl@linux.com \
--cc=ebiederm@xmission.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mtk.manpages@gmail.com \
--cc=serge.hallyn@canonical.com \
--cc=tobias@miglix.eu \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®