From: ebiederm@xmission.com (Eric W. Biederman)
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linuxram@us.ibm.com, containers@lists.osdl.org,
linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org,
util-linux-ng@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 0/8] unprivileged mount syscall
Date: Mon, 16 Apr 2007 09:40:35 -0600 [thread overview]
Message-ID: <m1d524l43w.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <E1HdNUv-0006gt-00@dorka.pomaz.szeredi.hu> (Miklos Szeredi's message of "Mon, 16 Apr 2007 11:27:45 +0200")
Miklos Szeredi <miklos@szeredi.hu> writes:
>> Arn't there ways to escape chroot jails? Serge had pointed me to a URL
>> which showed chroots can be escaped. And if that is true than having all
>> user's private mount tree in the same namespace can be a security issue?
>
> No. In fact chrooting the user into /share/$USER will actually
> _grant_ a privilege to the user, instead of taking it away. It allows
> the user to modify it's root namespace, which it wouldn't be able to
> in the initial namespace.
>
> So even if the user could escape from the chroot (which I doubt), s/he
> would not be able to do any harm, since unprivileged mounting would be
> restricted to /share. Also /share/$USER should only have read/search
> permission for $USER or no permissions at all, which would mean, that
> other users' namespaces would be safe from tampering as well.
A couple of points.
- chroot can be escaped, it is just a chdir for the root directory it
is not a security feature. The only security is that you have to be root to call chdir.
A carefully done namespace setup won't have that issue.
- While it may not violate security as far as what a user is allowed to modify it may
violate security as far as what a user is allowed to see.
There are interesting per login cases as well such as allowing a user to replicate
their mount tree from another machine when they log in. When /home is on a network
filesystem this can be very practical and can allow propagation of mounts across
machines not just across a single login session.
Eric
next prev parent reply other threads:[~2007-04-16 15:44 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070404183012.429274832@szeredi.hu>
2007-04-06 23:02 ` Andrew Morton
2007-04-06 23:16 ` H. Peter Anvin
2007-04-06 23:55 ` Jan Engelhardt
2007-04-07 0:22 ` H. Peter Anvin
2007-04-07 3:40 ` Eric Van Hensbergen
2007-04-07 6:48 ` Miklos Szeredi
2007-04-10 8:52 ` Ian Kent
2007-04-11 10:48 ` Miklos Szeredi
2007-04-11 13:48 ` Ian Kent
2007-04-11 14:26 ` Serge E. Hallyn
2007-04-11 14:27 ` Ian Kent
2007-04-11 14:45 ` Serge E. Hallyn
2007-04-07 6:41 ` Miklos Szeredi
2007-04-09 14:38 ` Serge E. Hallyn
2007-04-09 16:24 ` Miklos Szeredi
2007-04-09 17:07 ` Serge E. Hallyn
2007-04-09 17:46 ` Ram Pai
2007-04-09 18:25 ` H. Peter Anvin
2007-04-10 10:33 ` Karel Zak
2007-04-09 20:10 ` Miklos Szeredi
2007-04-10 8:38 ` Ram Pai
2007-04-11 10:44 ` Miklos Szeredi
2007-04-11 18:28 ` Ram Pai
2007-04-13 11:58 ` Miklos Szeredi
2007-04-13 13:28 ` Serge E. Hallyn
2007-04-13 14:05 ` Miklos Szeredi
2007-04-13 21:44 ` Serge E. Hallyn
2007-04-15 20:39 ` Miklos Szeredi
2007-04-16 1:11 ` Serge E. Hallyn
2007-04-16 8:18 ` Ram Pai
2007-04-16 9:27 ` Miklos Szeredi
2007-04-16 15:40 ` Eric W. Biederman [this message]
2007-04-16 15:55 ` Miklos Szeredi
2007-04-13 20:07 ` Karel Zak
2007-04-15 20:21 ` Miklos Szeredi
2007-04-16 7:59 ` Ram Pai
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=m1d524l43w.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxram@us.ibm.com \
--cc=miklos@szeredi.hu \
--cc=util-linux-ng@vger.kernel.org \
/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
Powered by JetHome