WebApp Sec mailing list archives
Re: Chroot jails
From: Antoine Martin <antoine () nagafix co uk>
Date: Wed, 21 Sep 2005 09:19:07 +0100
Wondered if people could give me their opinions on chroot jailsAFAIK, chroot on linux is fundamentally insecure - look for the 'chroot-again' flaw. Last time I checked it still worked and allowed to escape.A chrooted jail without dropping privileges is vain anyway.
Indeed. Which is why I prefer: http://www.suse.de/~marc/compartment.html Unlike chroot you can drop privileges in one swoop. It deserves to be mentioned in this thread.
The only way to escape would be some executable on the machine with suid a/o sguid flag set that performs the "chroot-again" for the in-jail process.
Or through some other (combination of) exploit(s) - which is reasonably hard to do, but not impossible.
If you have something like that on your machine, or there is any non-root user who is able to install something like that there, then you can consider your system to be compromised anyway...
You don't want to have local users anywhere near the chroot, but if you have to, see below.
(The problem is, that most web-app related stuff out there does NOT disable suid executables, so you have to triple check that the process in the jail will never be able to exec something with effective uid 0)
Which is effectively what SELinux does with state transitions, without forcing you to inspect all the executables (least privilege). Antoine
Current thread:
- Chroot jails Steve.Cummings (Sep 20)
- Re: Chroot jails JamesHorwath (Sep 20)
- Re: Chroot jails Antoine Martin (Sep 20)
- Re: Chroot jails Ingo Struck (Sep 20)
- Re: Chroot jails Antoine Martin (Sep 21)
- Re: Chroot jails Ingo Struck (Sep 20)
- Re: Chroot jails Mamading Ceesay (Sep 20)
- Re: Chroot jails xyberpix (Sep 20)
- Re: Chroot jails Paul Wong (Sep 21)
- <Possible follow-ups>
- RE: Chroot jails Craig Wright (Sep 20)
- RE: Chroot jails Wall, Kevin (Sep 21)