David Newall <david@davidnewall.com> wrote:chroot with having open directories outside the chroot is a convenience feature, allowing e.g. to install programs into a different root while opening the archives from another root tree. Only if there is a working capability system preventing root from accessing the hardware*, a chroot may become a security feature. Off cause having the new fchdir, you might run "chroot /var/foo 3< /" in order to pass a dir filehandle and compromise your own security, but this is nothin a system should protect against. The only problem I'm concerned about is passing a file descriptor to a privileged, compromised process using an abstract unix socket. This combines two different privileges, possibly increasing the impact of the attack. I think it may be enough to not allow passing directory fds if the two processes have different device/inode/namespace, but I'm not sure about device fds. *) chmod u+s binary; su nobody; exec binary; mount tmpfs /; mknod dev_mem should be enough to void most root-in-chroot setups. Very untested. -- Funny quotes: 26. If you take an Oriental person and spin him around several times, does he become disoriented? Friß, Spammer: hrzoi8.sT@gYjoOs.7eggert.dyndns.org zq@u1kq.7eggert.dyndns.org -
| Alexandre Oliva | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Eric W. Biederman | Re: [net-2.6.24][patch 2/2] Dynamically allocate the loopback device |
| Ingo Molnar | Re: containers (was Re: -mm merge plans for 2.6.23) |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Michael Riepe | Re: 2.6.27.19 + 28.7: network timeouts for r8169 and 8139too |
