Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chroot and mount --bind and security
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Wed Jul 27, 2005 8:00 pm    Post subject: chroot and mount --bind and security Reply with quote

Hi guys!

I want to setup a cgi-server in a chroot. It should do perl which is a PITA to chroot. So I had the following (stupid?) idea:
Code:
mkdir /var/cache/jail/root
mkdir /var/cache/jail/empty
mount --bind / /var/cache/root
mount --bind /var/cache/jail/empty /var/cache/root/etc
...
chroot /var/cache/jail/root /bin/bash

/etc and some more dir is now invisible in the chroot. Does this really increase security or is this idea just stupid? / is mounted read-only, so the stuff in /bin and /usr is not modifiable.
Also I heard you can leave a chroot, if you are root - at least without grsec. How does this work?

Grettings, Björn
Back to top
View user's profile Send private message
olivierva
n00b
n00b


Joined: 12 Feb 2003
Posts: 58
Location: London (UK)

PostPosted: Wed Jul 27, 2005 8:29 pm    Post subject: Reply with quote

It helps security a bit, but have a look at this:

How to break out of a chroot() jail

Cheers,

Olivier
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum