Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps

From: Ulrich Drepper
Date: Tue Oct 03 2006 - 15:18:54 EST


Stas Sergeev wrote:
> My position is simple: the ld.so problem needs a better
> solution than the current one. The current one, for example,
> still allows to use ld.so directly to execute the files for
> which you do not have an exec permission. And that's not an
> only problem...

You really don't get it, do you. The way ld.so works can be implemented
in many other forms with other programs. With some time and energy you
likely can write a perl or python script to do it. "ld.so" is a place
holder for everything userlevel that wants to map executables.


> And allow an attacker to store his files on that partition,
> and then execute them.

They can do it anyway.


> I have already proposed another solution for ld.so problem
> 3 times.

And for obvious reasons I ignored it.

noexec mounts the way _you_ want them are completely, utterly useless.
nonexec mounts as they are today plus an upcoming mprotect patch give
fine grained control. You have to use additional mechanism like SELinux
to fill in all the holes but that's OK. nonexec mounts give a great
deal more of flexibility.

--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature