Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2015 00:32:44 -0500
From:      "Michael B. Eichorn" <ike@michaeleichorn.com>
To:        Aleksandr Miroslav <alexmiroslav@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: best practice for locking down private jail?
Message-ID:  <1449811964.30424.61.camel@michaeleichorn.com>
In-Reply-To: <CACcSE1ytnqK_e8TBj_VGvznaPs%2B1q6sh0RsFCHQT9Tpxqk7jqw@mail.gmail.com>
References:  <CACcSE1yQO8AjW9rpY%2Bd2p1-ArPbO4qKV0zcaCMyRhYEWLOpQGA@mail.gmail.com> <20151203073923.17dae0c41a2b5e29a5b3a3dd@sohara.org> <CACcSE1zhMLnbo%2BbOixOM_ZLBpP%2BszbmzfFH_12v36ezy34fs9g@mail.gmail.com> <20151210144007.GA23555@fanty-a.tf.uni-kiel.de> <20151210150224.18d842126bf67bb0b07dcdf6@sohara.org> <CACcSE1ytnqK_e8TBj_VGvznaPs%2B1q6sh0RsFCHQT9Tpxqk7jqw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2015-12-10 at 11:33 -0800, Aleksandr Miroslav wrote:
> On Thu, Dec 10, 2015 at 7:02 AM, Steve O'Hara-Smith <steve@sohara.org
> > wrote:
> > > I think the cron job isn't needed. Create a directory outside the
> > > jails
> > > and mount it as nullfs and 'rw' into the upload jail and 'ro'
> > > into the
> > > web server jail. We do this on a zfs basis.
> > 
> > That works of course, but loses the opportunity to verify the files
> > before putting them online.
> 
> Exactly. The situation I'm trying to avoid is where someone
> compromises the key
> and credentials of the uploader and is able to accesses the "upload"
> jail. If I sanitize
> the files before copying them to the "web" jail, just about the only
> thing they will be
> able to do is put up audio files of the form lecture-001.mp3,
> lecture-002.mp3, and so one.

Although if you want to be really paranoid have the cron script spin up
another jail to do the validations in and run an IDS against the jail
afterwards to make sure there were no tar/libmagic/whatever exploits in
the uploaded file. After all, if you really don't trust it don't run it
on the jailhost either.

I am sure we get get this really complicated if the whole list piles
on.

[Read this whole thing as me being a smart-aleck, what you have done
already is better than most sysadmins would bother with, I just
couldn't resist.]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1449811964.30424.61.camel>