From: ebiederm@xmission.com (Eric W. Biederman)
To: Andy Lutomirski <luto@amacapital.net>
Cc: Seth Forshee <seth.forshee@canonical.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jeff Layton <jlayton@poochiereds.net>,
"J. Bruce Fields" <bfields@fieldses.org>,
Serge Hallyn <serge.hallyn@canonical.com>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
LSM List <linux-security-module@vger.kernel.org>,
SELinux-NSA <selinux@tycho.nsa.gov>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH v3 2/7] userns: Simpilify MNT_NODEV handling.
Date: Wed, 16 Sep 2015 19:54:26 -0500 [thread overview]
Message-ID: <87r3lxyif1.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <CALCETrXoAi91JN4VLD2ybPgkD_J26=2_N-fyCCjOPL5Swo7kGA@mail.gmail.com> (Andy Lutomirski's message of "Wed, 16 Sep 2015 17:24:47 -0700")
Andy Lutomirski <luto@amacapital.net> writes:
> On Wed, Sep 16, 2015 at 1:02 PM, Seth Forshee
> <seth.forshee@canonical.com> wrote:
>> From: "Eric W. Biederman" <ebiederm@xmission.com>
>>
>> - Consolidate the testing if a device node may be opened in a new
>> function may_open_dev.
>>
>> - Move the check for allowing access to device nodes on filesystems
>> not mounted in the initial user namespace from mount time to open
>> time and include it in may_open_dev.
>>
>> This set of changes removes the implicit adding of MNT_NODEV which
>> simplifies the logic in fs/namespace.c and removes a potentially
>> problematic user visible difference in how normal and unprivileged
>> mount namespaces work.
>>
>> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
>
>> - /* Only in special cases allow devices from mounts
>> - * created outside the initial user namespace.
>> - */
>> - if (!(type->fs_flags & FS_USERNS_DEV_MOUNT)) {
>> - flags |= MS_NODEV;
>> - mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV;
>> - }
>
> This is an ABI change. It's probably okay, but I think the commit
> message should make it clear what's happening.
You mean it should include in big flashing neon letters
***REGRESSION FIX***
?
It is longer in coming than I had hoped. But that is part of the reason
I did not fix the security hole this way. Getting the s_user_ns stuff
just so has been non-trivial.
I do agree that because this is a user visible change we do need to keep
our eyes peeled for pieces of userspace software that may depend on the
exact details of the current behavior.
Eric
next prev parent reply other threads:[~2015-09-17 1:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 20:02 [PATCH v3 0/7] Initial support for user namespace owned mounts Seth Forshee
2015-09-16 20:02 ` [PATCH v3 1/7] fs: Add user namesapace member to struct super_block Seth Forshee
2015-09-16 20:02 ` [PATCH v3 2/7] userns: Simpilify MNT_NODEV handling Seth Forshee
2015-09-17 0:24 ` Andy Lutomirski
2015-09-17 0:54 ` Eric W. Biederman [this message]
2015-09-17 22:15 ` Andy Lutomirski
2015-09-16 20:02 ` [PATCH v3 3/7] fs: Verify access of user towards block device file when mounting Seth Forshee
2015-09-16 20:02 ` [PATCH v3 4/7] fs: Limit file caps to the user namespace of the super block Seth Forshee
2015-09-16 20:02 ` [PATCH v3 5/7] fs: Treat foreign mounts as nosuid Seth Forshee
2015-09-16 20:57 ` Andy Lutomirski
2015-09-17 12:49 ` Seth Forshee
2015-09-23 21:00 ` Andy Lutomirski
2015-09-16 20:02 ` [PATCH v3 6/7] Smack: Add support for unprivileged mounts from user namespaces Seth Forshee
2015-09-16 20:33 ` Casey Schaufler
2015-09-17 12:50 ` Seth Forshee
2015-09-16 20:02 ` [PATCH v3 7/7] selinux: " Seth Forshee
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=87r3lxyif1.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=bfields@fieldses.org \
--cc=jlayton@poochiereds.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-security-module@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=selinux@tycho.nsa.gov \
--cc=serge.hallyn@canonical.com \
--cc=seth.forshee@canonical.com \
--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