Re: New Security Features, Please Comment

Geoffrey McRae
2008-12-05T03:51:09Z

> Thus providing me with a way to DoS your webserver by sticking all your
> server processes into a sleep-forever... :)

Yeah, I realise that, its not the problem I am trying to solve though.

>
> You're also overlooking the fact that the malicious code could do something
> like this:
>
> /* send the parent something that makes it *think* the request finished */
> printf("We're all done now\n");
> while (getpid()) msleep (1);
>

Hmm, your right, there has to be a way to overcome all these issues
without having the fork overhead.

I have been toying with an alternate solution of allowing the parent
process to chroot & re-chroot it's children, but even that has the same
problem.

A hack to stop that would be to make getuid... etc, fudge their values
by always returning a constant value to the child, but it is an ugly way
to do this and would involve making stat lie about the ownership of
files too, and anything else that could be used to determine the real
uid or gid.

It seems that solving this issue is alot more complex then I first
envisioned.

Anyone else have any ideas of a fast, efficient and secure way to
accomplish this?