[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] chrooting a program not designed to be chrooted *is this safe*?



Thats what I wanted to know. Thanks, and yes I know it was a dirty hack.
It's was never really intended other than that, and to see if I could force
a particular program or two into a chroot and see what happens before I
tried to modify the code of the project.

Is the approach sound?  If I was to apply this to a specific program would
it be safe?  It's more of a learning process than a true solution.  (It did
answer the original question posted a while back, even if it is a dirty
hack.)

Ted
----- Original Message -----
From: "Theo de Raadt" <deraadt@cvs.openbsd.org>
To: "Ted Goodridge, Jr" <tedgoodridgejr@acm.org>
Cc: <misc@openbsd.org>
Sent: Monday, February 03, 2003 12:18 AM
Subject: Re: [SOLVED] chrooting a program not designed to be chrooted *is
this safe*?


> I'm not sure how secure this is, but I wrote a C wrapper to allow any
> program to run in a chroot'ed directory with reduced priveldges of choice.
> The wrapper must be executed as root, but the given program will run at
any
> privelege you desire.

In general, I discourage against such simplistic approaches.  It is
better to modify a program correctly, and to review what will happen,
to know what you are doing, than blindly put it in a jail.  Why?

A program that runs safely inside a chroot space, but then oh oh, it
just tried to do something it WAS supposed to do, but cannot inside
the chroot space, oh, it just crashed.  Shit.  Well, god damn, why am
I running this guy's chroot wrapper.  I'll just disable it and go back
to running it normally. That sucked....

... anyways, that is what a user of such a thing will think, and
therefore, I do not think these are good security technologies: It
ignores what the program's needs are.

That's my view.  You guys out there who like such things can go ahead
and use them until the programs crash on you... and around here we'll
continue in our belief that locking programs down must only interfere
with existing functionality when the consequences are carefully
thought through, and even less often with reliablity.

I hate hacks.