[lkml]   [2013]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][PATCH 0/3] vfs: Detach mounts on unlink.
On Sat, Oct 5, 2013 at 4:17 PM, Linus Torvalds
<> wrote:
> So learn this pattern: every time you use chroot, add a simple
> chdir("/");
> immediately after the chroot call.

.. btw, also make sure that you close all non-essential file
descriptors. Having any open directory file descriptors pointing to
outside the chroot is also a classic escape.

Even then, escaping chroot is usually fairly easy. Making a
escape-proof chroot is really quite hard. Basically impossible if you
allow root.


 \ /
  Last update: 2013-10-06 01:41    [W:0.264 / U:5.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site