Subject: Re: chroot jail for ftpd
To: Steve Bellovin <smb@research.att.com>
From: Simon Burge <simonb@wasabisystems.com>
List: netbsd-users
Date: 10/18/2001 11:51:06
Steve Bellovin wrote:

> The problem is the 'incoming' directory.  My concern is that *if* someone
> finds a flaw in ftpd (say, a buffer overflow), they could do a mknod in 
> the upload directory and use that to escape the chroot.  The question is
> what can I do to prevent that.  I've toyed with adding a 'no special 
> files' flag to the kernel; I've also checked to see if there's some 
> mount option akin to nocoredump, but I don't see any.

mount -o nodev ... ?

             nodev       Do not interpret character or block special devices
                         on the file system.  This option is useful for a
                         server that has file systems containing special de-
                         vices for architectures other than its own.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/