On Wed, 26 Sep 2007, David Newall wrote:The root directory, '/' is changed, and if the process is capable of using chroot, it may change the root directory again. Works as defined. As long as root has more than a safe subset of capabilities, root can escape a chroot. Besides that, fchdir on open-at-chroot fds does not decrease the security, since the attacker needs help from the outside root, who is not restricted by chroot. I'm more concerned about abstract unix sockets, they could be used to send a file descriptor to compromised daemons and extend exploits to the outside of a chroot and across namespaces - at least I suspect it. The whole f* family of syscalls would be affected. This can be cured by e.g. not allowing to receive fds if the root+namespace do not match. The good guys don't cd out, they open the instalkler archive, chroot to the new system root and extract it there. Then they chroot back using the saved cwd. As in jail()? As far as I know, the new virtualisation features sneaking into the kernel will allow implementing a jail, too, in a more secure way than any hacking on chroot can give. There are implementations of chroot which imply chdir(), and not having f* functions, they can not _directly_ acces files outside the chroot. But as long as they can e.g. mknod /dev/mem or strace, they can do anything. So let's not put a fingerprint sensor on that chinese paper door. -- You know you're in trouble when packet floods are competing to flood you. -- grc.com -
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Pavel Roskin | ndiswrapper and GPL-only symbols redux |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Andi Kleen | Re: Why do so many machines need "noapic"? |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | Re: mac80211 truesize bugs |
