The ELF loader breaks on Linux systems running non-exec stack/heap technology
such as exec-shield. The patch I'm attaching below fixes 3 problems in
Created attachment 136 [details] [review]
exec-shield fixes for ELF loader
I believe this patch is fine. Has it been tested on OpenBSD? I trust it works
there - but just to make sure....
Well, lets put it in anyway...
I believe it should work on OpenBSD, but it's only been tested on Linux
to my knowledge. One problem I just noticed, is that the mprotect call
is assumed to succeed. The return code should be checked on all system
calls and have proper error handling. I'm going to update John's patch
to do that, and also search through the loader for similar errors.
Looks like mprotect failing would almost certainly be fatal.