Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps

From: Stas Sergeev
Date: Tue Oct 03 2006 - 15:05:59 EST


Hi.

Arjan van de Ven wrote:
then don't put noexec on /dev/shm.
That's obviously possible, but I'd feel safer having
"noexec" on *every* user-writable partition. It used
to work in the past - that way an attacker had no place
to run his binary from.

ld.so fix is phony. Really; I can always put an "unfixed" ld.so there
and use it as user.
See above. In the past it was possible to have "noexec"
on *all* user-writable mounts, so you couldn't run your
own ld.so that easily. Thats why I am reluctant to take
the "if it hurts, just remove noexec" argument.
And since you can run the scripts via binfmt-misc, I'd
also do "chmod 'o-x' perl", so that the direct invocation
of perl to not be possible for unwanted users. Or do not.
At least the approach I propose, allows to do this, so the
"script loader" problem can also be fixed that way.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/