From: Mike Frysinger <vapier@gentoo.org>
To: Tobias Markus <tobias@miglix.eu>
Cc: Richard Weinberger <richard.weinberger@gmail.com>,
LKML <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>,
LSM <linux-security-module@vger.kernel.org>,
"open list:ABI/API" <linux-api@vger.kernel.org>,
linux-man <linux-man@vger.kernel.org>
Subject: Re: [PATCH] userns/capability: Add user namespace capability
Date: Sun, 18 Oct 2015 20:28:07 -0400 [thread overview]
Message-ID: <20151019002807.GP28215@vapier.lan> (raw)
In-Reply-To: <5623FD86.2030609@miglix.eu>
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
On 18 Oct 2015 22:13, Tobias Markus wrote:
> On 17.10.2015 22:17, Richard Weinberger wrote:
> > On Sat, Oct 17, 2015 at 5:58 PM, Tobias Markus <tobias@miglix.eu> wrote:
> >> One question remains though: Does this break userspace executables that
> >> expect being able to create user namespaces without priviledge? Since
> >> creating user namespaces without CAP_SYS_ADMIN was not possible before
> >> Linux 3.8, programs should already expect a potential EPERM upon calling
> >> clone. Since creating a user namespace without CAP_SYS_USER_NS would
> >> also cause EPERM, we should be on the safe side.
> >
> > In case of doubt, yes it will break existing software.
> > Hiding user namespaces behind CAP_SYS_USER_NS will not magically
> > make them secure.
>
> The goal is not to make user namespaces secure, but to limit access to
> them somewhat in order to reduce the potential attack surface.
the irony is that disallowing non-privileged processes access to userns means
processes cannot jail themselves and thus make themselves more secure. i've
been adding userns to various projects purely to get access to things like
mount, net, pid, sysv, and ipc namespaces.
putting this behind a cap also breaks the Chromium sandbox -- they were able
to drop set*id on the sandbox binary and utilize userns instead.
https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandboxing.md
https://code.google.com/p/chromium/issues/detail?id=312380
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-10-19 0:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 15:58 [PATCH] userns/capability: Add user namespace capability 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 [this message]
2015-10-17 21:55 ` Serge E. Hallyn
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=20151019002807.GP28215@vapier.lan \
--to=vapier@gentoo.org \
--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=richard.weinberger@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;
as well as URLs for NNTP newsgroup(s).