From: Andy Lutomirski <luto@amacapital.net>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
lkml <linux-kernel@vger.kernel.org>,
"linux-man@vger.kernel.org" <linux-man@vger.kernel.org>,
Linux Containers <containers@lists.linux-foundation.org>,
richard -rw- weinberger <richard.weinberger@gmail.com>,
"Serge E. Hallyn" <serge@hallyn.com>
Subject: Re: For review: user_namespace(7) man page
Date: Tue, 9 Sep 2014 12:39:44 -0700 [thread overview]
Message-ID: <CALCETrVhBz7YT9yw+ZSpW+3cM85iYRXXnLY1cRPVhb04NN=_Pw@mail.gmail.com> (raw)
In-Reply-To: <CALCETrV4WizRXD9JuwibUBbQE9hhNrRDJ3cYyXdhd=OfPziF5g@mail.gmail.com>
On Tue, Sep 9, 2014 at 12:26 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> On Tue, Sep 9, 2014 at 9:05 AM, Eric W. Biederman <ebiederm@xmission.com> wrote:
>>
>> We may also want to discuss the specific restrictions on chroot.
>>
>> The text about chroot at least gives people a strong hint that the
>> chroot rules are affected by user namespaces.
>>
>> The restrictions that we have settled on to avoid chroot being a problem
>> are the creator of a user namespace must not be chrooted in their
>> current mount namespace, and the creator of the user namespace must not
>> be threaded.
>>
>> Andy can you check me on this it looks like unshare is currently buggy
>> in that it will allow a threaded application to create a user namespace.
>
> I think it's this code in unshare:
>
> /*
> * If unsharing a user namespace must also unshare the thread.
> */
> if (unshare_flags & CLONE_NEWUSER)
> unshare_flags |= CLONE_THREAD | CLONE_FS;
>
> I suppose that this should be documented.
>
> CLONE_FS prevents the chroot from leaking out of the namespace. (But
> see the other thread that I'm about to start...)
Never mind. I thought I saw a bug, but I was wrong.
--Andy
next prev parent reply other threads:[~2014-09-09 19:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 23:36 For review: user_namespace(7) man page Michael Kerrisk (man-pages)
2014-08-22 21:12 ` Serge E. Hallyn
2014-09-01 16:58 ` Michael Kerrisk (man-pages)
2014-08-30 21:53 ` Eric W. Biederman
2014-09-01 17:31 ` Michael Kerrisk (man-pages)
2014-09-02 1:05 ` Eric W. Biederman
2014-09-09 14:00 ` Michael Kerrisk (man-pages)
2014-09-09 16:16 ` Eric W. Biederman
2014-09-11 14:40 ` Michael Kerrisk (man-pages)
2014-09-09 13:59 ` Michael Kerrisk (man-pages)
2014-09-09 15:49 ` Eric W. Biederman
2014-09-11 14:40 ` Michael Kerrisk (man-pages)
2014-09-09 13:59 ` Michael Kerrisk (man-pages)
2014-09-09 15:51 ` Eric W. Biederman
2014-09-11 14:40 ` Michael Kerrisk (man-pages)
2014-09-01 20:57 ` Andy Lutomirski
2014-09-09 14:00 ` Michael Kerrisk (man-pages)
2014-09-09 16:05 ` Eric W. Biederman
2014-09-09 19:26 ` Andy Lutomirski
2014-09-09 19:39 ` Andy Lutomirski [this message]
2014-09-11 14:47 ` Michael Kerrisk (man-pages)
2014-09-11 15:15 ` Andy Lutomirski
2014-09-14 2:58 ` Michael Kerrisk (man-pages)
2014-09-11 14:46 ` Michael Kerrisk (man-pages)
2014-09-11 15:14 ` Andy Lutomirski
2014-09-14 2:42 ` Michael Kerrisk (man-pages)
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='CALCETrVhBz7YT9yw+ZSpW+3cM85iYRXXnLY1cRPVhb04NN=_Pw@mail.gmail.com' \
--to=luto@amacapital.net \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=richard.weinberger@gmail.com \
--cc=serge@hallyn.com \
/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).