Re: Linux kernel patch to remove stack exec permission

Zefram (zefram@dcs.warwick.ac.uk)
Mon, 14 Apr 1997 16:12:07 +0100 (BST)


Ingo Molnar wrote:
>would it be a good idea to strip off the highest bit in env[] and args[]
>when exec()-ing?

Don't be silly. Some of us use full Latin-1 or UTF-8 for filenames,
and in grep patterns, and so on.

>for the BSS/malloc() things we could theoretically get the kernel to put
>executable mmap()-ed areas into the 0-1G range, and the rest into the
>1G-2G range.

This is the Right Thing to do w.r.t. trampolines. Fancy hacking that
into gcc?

Then again, it might be easier just to stop writing programs that smash
the stack. Amazingly enough, this confers other benefits too.

-zefram