Re: New Security Features, Please Comment

From: Nick Andrew
Date: Thu Dec 04 2008 - 22:44:19 EST

On Thu, Dec 04, 2008 at 10:35:27PM -0500, Valdis.Kletnieks@xxxxxx wrote:
> 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);

I think it's pretty basic that setgid/setuid needs to be done _before_
exec'ing untrusted code.

On the other hand, if a trusted process gets its uid changed _and_
expects this to happen then I suppose it can be secure. But if a
process's uid gets changed unexpectedly then nasty things already
pointed out by Alan and others can occur.

PGP Key ID = 0x418487E7
PGP Key fingerprint = B3ED 6894 8E49 1770 C24A 67E3 6266 6EB9 4184 87E7
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at