9

I was reading description about setuid on wikipedia http://en.wikipedia.org/wiki/Setuid

I was unable to understand how chroot is related to setuid as mention in following paragraph from wikipedia

The presence of setuid executables explains why the chroot system call is not available to non-root users on Unix. See limitations of chroot for more details.

MadHatter
  • 81,580
Mr Coder
  • 195

1 Answers1

12

If a non-privileged user could execute a setuid program in a chroot jail, they could carefully construct that jail to trick the program into escalating privileges. For example, I can construct a chroot jail in which I'm permitted to use sudo, because I can control every configuration file inside that jail.

MadHatter
  • 81,580