From: ebiederm@xmission.com (Eric W. Biederman)
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Linas Vepstas <linasvepstas@gmail.com>,
Amir Goldstein <amir73il@gmail.com>,
Miklos Szeredi <miklos@szeredi.hu>,
linux-unionfs@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Seth Forshee <seth.forshee@canonical.com>
Subject: Re: LXC+overlayfs in unprivileged mode
Date: Wed, 04 Jan 2017 12:47:57 +1300 [thread overview]
Message-ID: <87vatvu2mq.fsf@xmission.com> (raw)
In-Reply-To: <20170103134806.GA29807@redhat.com> (Vivek Goyal's message of "Tue, 3 Jan 2017 08:48:06 -0500")
Vivek Goyal <vgoyal@redhat.com> writes:
> On Sun, Jan 01, 2017 at 02:32:20PM -0600, Linas Vepstas wrote:
>
> [..]
>> It's somehow ironic that the push for user-space mounts and containers
>> comes from this general fuzzy sensation that they are somehow "safer",
>> yet the changes to enable this provide a new attack surface for
>> privilege escalation. Funny world we live in. :-) Happy New Year!
>
> Only if unprivileged users want to be able to mount overlayfs. Otherwise, a
> privileged user can just mount overlayfs on host and bind mount that
> inside container (this is what docker does). And then you don't have
> to worry about allowing unprivileged users to be able to allow
> mounting.
Which is a blame shifting game and we should not be playing.
A kernel feature useful for ordinary users for ordinary workloads
should not require special permissions to use.
Kernel features are built to be used. User space programs will use
them. If those features can not be used safely and we blame that on
userspace we are just not accepting the responsibility of making them
work ourselves. A really jerk move.
In a change in what permissions are needed to use a kernel feature we
need to make the kernel change in small responsible steps. Many kernel
features are not coded defensively so before we enable them for ordinary
users we need to do our best to ensure they are safe to use and ensure
their maintainers are on board with what is going on.
I can't see any policy that only allows root to mount things as healthy
or maintainable in the long term. We have long exceeded the point where
root is the only user that wants to mount things. So the best long term
strategy is to build a sufficient policy in the kernel that does not
require mediation by userspace.
Furthermore docker that does not need root privileges is currently being
debugged. So we are long past any point where it even makes sense
to consider a policy of only allowing root to mount things. That ship
has sailed.
Eric
prev parent reply other threads:[~2017-01-03 23:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-31 17:42 LXC+overlayfs in unprivileged mode Linas Vepstas
2017-01-01 8:51 ` Amir Goldstein
2017-01-01 20:32 ` Linas Vepstas
2017-01-03 13:48 ` Vivek Goyal
2017-01-03 16:08 ` Linas Vepstas
2017-01-04 13:49 ` Vivek Goyal
2017-01-03 23:47 ` Eric W. Biederman [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=87vatvu2mq.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=amir73il@gmail.com \
--cc=linasvepstas@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=seth.forshee@canonical.com \
--cc=vgoyal@redhat.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