lkml.org 
[lkml]   [2013]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 0/3] vfs: Detach mounts on unlink.
On 10/05/2013 06:24:51 PM, Al Viro wrote:
> On Sat, Oct 05, 2013 at 04:17:55PM -0700, Linus Torvalds wrote:
> > On Sat, Oct 5, 2013 at 4:07 PM, Rob Landley <rob@landley.net> wrote:
> > >
> > > A todo item I've had _forever_ is fixing chroot() to not be
> broken so that
> > > you can trivially break out of a chroot via:
> >
> > What drugs are you on?
> >
> > Your example is moronic, and against all _documented_ uses of
> chroot.
>
> ... and even fixing that example (chroot *can* be escaped, if you can
> call chroot(2) - mkdir /foo, chdir /, chroot /foo, chroot .. and you
> are out)

Um, wasn't that my example?

> the whole thing is idiocy - chroot() is not and has never been
> root-proof
> and anybody expecting it to be has failed to read any number of FAQs
> out
> there.

Which is why I was proposing modifying it so lxc and containers didn't
have to use pivot_root() instead, with all the logic to rehome existing
processes and the weird "this path is relative the old root, this path
is relative to the new root" syntax from initial ramdisks.

Rob

\
 
 \ /
  Last update: 2013-10-06 02:41    [W:0.149 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site