public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Serge Hallyn <serge.hallyn@ubuntu.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] allow some kernel filesystems to be mounted in a user namespace
Date: Wed, 17 Jul 2013 07:41:05 -0500	[thread overview]
Message-ID: <20130717124105.GA4442@sergelap> (raw)
In-Reply-To: <87d2qh91xm.fsf@xmission.com>

Quoting Eric W. Biederman (ebiederm@xmission.com):
> "Serge E. Hallyn" <serge@hallyn.com> writes:
> 
> > I'm not "relying on LSM" to make these safe.  I'm relying on the
> > uid mappings to make these safe.
> >
> > Nevertheless I at least have hope of working around the others (in a
> > distro-acceptable way), so if the others are too scary I'll pursue
> > the workaround for the others and see where I get.  But I really feel
> > the securityfs one is the best solution.
> 
> Personally I don't trust debugfs enough to compile it into my kernel.

That, again, seems reasonable, but would also seem to invalidate
objections to this patch :)  but,

> fuse simply isn't ready to be have fresh mounts usefully created inside
> a user namespace.
> 
> Fundamentally with debugfs and securityfs you run into the issue we saw
> with sysfs and proc where at some level it is the system administrators
> perogative if those filesystems should be mounted.
> 
> The rule with filesystems like that is mounting them needs to be no more
> dangerous than bind mounting them.  At the point in the cycle you are
> talking about mounting them you presumably have already thrown away
> their original mounts making it impossible to tell if it would have been
> safe to mount them or not.  Making your patch completely inappropriate.

Right so the specific problem this patch introduces is:  An admin who is
using a distro kernel with these filesystems enabled but not mounted,
without this patch does not have to worry about unprivileged users being
able to access the fs.  With this patch, he does.

Thanks everyone, I withdraw this patch.

> What you need to do is at container setup time to bind mount those
> filesystems if they are already mounted and you want them in the
> container.  If you are just shuffling around something you can already
> see there are no security issues.

-serge

      reply	other threads:[~2013-07-17 12:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 19:29 [PATCH RFC] allow some kernel filesystems to be mounted in a user namespace Serge Hallyn
2013-07-16 19:38 ` Al Viro
2013-07-16 19:50   ` Serge E. Hallyn
2013-07-16 21:33     ` Andy Lutomirski
2013-07-16 21:37       ` Serge E. Hallyn
2013-07-16 21:39         ` Serge E. Hallyn
2013-07-16 21:44         ` Andy Lutomirski
2013-07-16 22:03           ` Serge E. Hallyn
2013-07-16 22:07             ` Andy Lutomirski
2013-07-16 22:23               ` Serge E. Hallyn
2013-07-17  5:43                 ` Eric W. Biederman
2013-07-17 12:41                   ` Serge Hallyn [this message]

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=20130717124105.GA4442@sergelap \
    --to=serge.hallyn@ubuntu.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=serge@hallyn.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