From: Shaya Potter <spotter@cs.columbia.edu>
To: linux-kernel@vger.kernel.org
Subject: Re: can chroot be made safe for non-root?
Date: 18 Oct 2002 17:36:11 -0400 [thread overview]
Message-ID: <1034976970.2179.93.camel@zaphod> (raw)
In-Reply-To: <aopspi$alg$1@abraham.cs.berkeley.edu>
On Fri, 2002-10-18 at 17:00, David Wagner wrote:
> Shaya Potter wrote:
> >the problem with chroot() is that they dont nest.
>
> That's *a* problem, but not (IMHO) the most significant problem.
> The biggest disadvantages with chroot() (as I see it) are:
> * not useable unless you're root
is this a problem from a security perspective, or a design perspective.
i.e. users should be able to chroot their processes, not to gain
security but just to be able to do things. Or also for security?
> * too coarse-grained
what exactly do you mean?
> * only protects the filesystem, but not other resources (e.g., the
network)
yes, chroot doesn't make a jail, but chroot + other stuff can make a
jail, and chroot can give you the fs side for close to free (lost
performance that is)
> * not suitable for jailing root
b/c root can break out easily, right? to jail root you need other stuff
as I said above.
>
> > If however, one could provide even a single level of nesting, such
that
> > a chroot outside of a chroot sets the first level, and any other
chroot
> > after that sets the inner level, then even root wouldn't be able to
> > break out of the chroot (presuming it didn't bring any fd's into the
> > chroot w/ it).
>
> This is not quite right. There are LOTS of other ways that root
> can break out of a chroot.
how? the class way is the fchdir, but I guess there are others, but my
brain is not seeing them right now.
> Actually, I suspect that nested chroot()s may not be needed very
> frequently, so I think a simpler approach may be simply to prevent
> a chrooted process from calling chroot() again: i.e., prevent nesting.
well, this would prevent you from using chroot w/ processes that want to
chroot (running an ftpd inside of a chroot, dont some like to chroot for
anonymous access?), I've thought about that in regards to my research
related to our zap system, and I would rather not have to do that.
next prev parent reply other threads:[~2002-10-18 21:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-16 5:51 can chroot be made safe for non-root? Eric Buddington
2002-10-16 6:44 ` Philippe Troin
2002-10-16 21:18 ` David Wagner
2002-10-16 22:04 ` Philippe Troin
2002-10-16 22:00 ` David Wagner
2002-10-19 17:44 ` Eric Buddington
2002-10-19 19:07 ` Bernd Eckenfels
[not found] ` <200210201715.07150.landley@trommello.org>
2002-10-21 20:29 ` Bernd Eckenfels
2002-10-22 15:42 ` Jesse Pollard
2002-10-22 16:55 ` Shaya Potter
2002-10-21 15:22 ` Alan Cox
2002-10-22 7:21 ` Ville Herva
2002-10-22 14:15 ` Shaya Potter
2002-10-22 15:55 ` Martin Josefsson
2002-10-16 21:14 ` David Wagner
2002-10-18 19:01 ` Pavel Machek
2002-10-18 20:14 ` David Wagner
2002-10-18 21:07 ` Shaya Potter
2002-10-18 21:00 ` David Wagner
2002-10-18 21:36 ` Shaya Potter [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-10-17 5:08 Niels Provos
2002-10-19 19:42 Hank Leininger
2002-10-20 10:40 ` Bernd Eckenfels
2002-10-20 14:49 ` Shaya Potter
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=1034976970.2179.93.camel@zaphod \
--to=spotter@cs.columbia.edu \
--cc=linux-kernel@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