lkml.org 
[lkml]   [2013]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] Patches to enable chroot for all users
On 3/20/2013 6:09 AM, tal.tchwella@gmail.com wrote:
> From: Tal Tchwella <tchwella@mit.edu>
>
> I want to suggest adding chroot capability to all users.

It is much too easy to create an environment for
tricking privileged programs using chroot to allow
unprivileged processes to use chroot. /etc/shadow
is your trivial attack surface.

> The following patches enable that capability, while considering the security mechanism needed to disable escape routes for chroots by non-root users,
> and keeping chroot backward-compatible for root users.
> The first patch establishes the concept of multi-user chroot, while disabling checks for root user in the chroot process.
> The second patch checks whether a fd that is sent to a chroot application by a non-root user refers to a directory.
> If that is the case, that fd is skipped, to disable an escape route.
> The third patch disables the option for applications that have open fds to directories to be chrooted by a non-root user.
>
> These patches were applied and test on linux-kernel 3.2.0-31-generic.
>
> Any comments, feedback and suggestions are appreciated!
>
> Thanks,
> Tal
>
>
> Tal Tchwella (3):
> enabled chroot for all users
> socket checks for uds fds transfer
> open fds check when starting chroot
>
> fs/exec.c | 3 +++
> fs/open.c | 32 ++++++++++++++++++++++++++++++--
> include/linux/sched.h | 12 ++++++++++++
> init/main.c | 1 +
> kernel/fork.c | 2 ++
> net/core/scm.c | 9 +++++++++
> 6 files changed, 57 insertions(+), 2 deletions(-)
>



\
 
 \ /
  Last update: 2013-03-20 17:41    [W:0.066 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site