lkml.org 
[lkml]   [2007]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sys_chroot+sys_fchdir Fix

> Normal users cannot use chroot() themselves so they can't use chroot to
> get back out

I think Bill is right, that this is to fix a method that non-root
processes can use to escape their chroot. The exploit, which is
documented in chroot(2)*, is to chdir("..") your way out. Who'd have
thought it? Only root can do that, but even that seems wrong. Chroot
should be chroot and that should be the end of it.

It looks to me like Miloslav has found a bug, although I suspect there's
a simpler solution because non-root is already prevented from escaping
this way.

David

* In particular, the superuser can escape from a ‘chroot jail’ by doing
‘mkdir foo; chroot foo; cd ..’.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-20 00:27    [W:0.079 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site