Bug 296 - [PATCH] ELF loader fixes for non-exec stack/heap on Linux
Summary: [PATCH] ELF loader fixes for non-exec stack/heap on Linux
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: highest normal
Assignee: Default Bug Report Assignee
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 213
  Show dependency treegraph
 
Reported: 2004-03-09 15:57 UTC by Mike A. Harris
Modified: 2004-03-12 22:23 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
exec-shield fixes for ELF loader (1.73 KB, patch)
2004-03-09 15:58 UTC, Mike A. Harris
no flags Details | Splinter Review

Description Mike A. Harris 2004-03-09 15:57:28 UTC
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
the loader.
Comment 1 Mike A. Harris 2004-03-09 15:58:31 UTC
Created attachment 136 [details] [review]
exec-shield fixes for ELF loader
Comment 2 Egbert Eich 2004-03-11 10:14:21 UTC
I believe this patch is fine. Has it been tested on OpenBSD? I trust it works
there - but just to make sure....
Comment 3 Egbert Eich 2004-03-11 10:19:55 UTC
Well, lets put it in anyway...
Comment 4 Mike A. Harris 2004-03-11 12:14:03 UTC
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.
Comment 5 Egbert Eich 2004-03-11 12:21:33 UTC
Looks like mprotect failing would almost certainly be fatal.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.