I'd like to verify the security of chroot and default programs in a linux distribution (say Ubuntu).
Example: I set up jail directory 'A'. Every linux binary from the distribution is placed in 'A' with ACLs being the same.
e.g. A/usr/bin contains all executables /usr/bin, A/bin has exe's from /bin, etc.
Assume no other files are written.
An untrusted user is then placed into chroot jail 'A' and operates as some random uid.
The question: Is this environment as secure as an unjailed one? Is it impossible for him to either get root access or break out of the jail? (barring linux root exploits)
For instance, I was initially worried that now the user could write his own sudoers file. But fortunately, sudo verifies that sudoers is owned by root. Is every standard setuid'd program this careful?