[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Different roots for each process possible?



> On most systems, I believe the easiest way of breaking a chroot jail as
> root is:
> 
> mkdir("whatever");
> /* lower the roof of the jail */
> chroot("whatever");
> /* we are now above the roof, and can fly away */
> chdir("../../../..");

This case was previously discussed here.  This circumvention works on the
Hurd too, and it makes perfect sense that both Unix and the Hurd work this
way.  That's why chroot should always be followed by chdir("/").



Reply to: