Chw00t: Breaking Unix chroot Solutions (2015) [video]
chroot is a very simple facility that can provide meaningful security.  So yes, it can be used as a security feature.  People just need to understand its limitations.  No, it won&#x27;t prevent kernel exploits.  Yes, root can escape it (1996 called?  <a href="http:&#x2F;&#x2F;cvsweb.openbsd.org&#x2F;cgi-bin&#x2F;cvsweb&#x2F;src&#x2F;lib&#x2F;libc&#x2F;sys&#x2F;chroot.2.diff?r1=1.2&amp;r2=1.3" rel="nofollow">http:&#x2F;&#x2F;cvsweb.openbsd.org&#x2F;cgi-bin&#x2F;cvsweb&#x2F;src&#x2F;lib&#x2F;libc&#x2F;sys&#x2F;ch...</a> )  It&#x27;s not going to protect you from a malicious or vulnerable process running as root; you&#x27;re already rooted.<p>So once you leave out the exploits that require root, you&#x27;re mostly left with the issue of ptrace, unless you also have another malicious process running on your system.  Even if it ptrace couldn&#x27;t help a process out of a chroot, it is still a big risk, so use good privsep hygiene (no shared UIDs outside the chroot), or disable it entirely, if it&#x27;s not needed.<p>Worth noting, OpenBSD defaults to disallowing global ptrace, i.e. you can only trace child processes, such as those started by gdb.