Bug 127686 - RHEL3 U3 kernel has execstack support, but no PROT_GROWSDOWN
Summary: RHEL3 U3 kernel has execstack support, but no PROT_GROWSDOWN
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ingo Molnar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 123574 127692
TreeView+ depends on / blocked
 
Reported: 2004-07-12 16:17 UTC by Jakub Jelinek
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-20 20:55:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:550 0 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 3 Update 4 2004-12-20 05:00:00 UTC

Description Jakub Jelinek 2004-07-12 16:17:19 UTC
Without PROT_GROWSDOWN, especially on RHEL3 Ux where there are still
many shared libraries either without PT_GNU_STACK or with RWE PT_GNU_STACK,
the dynamic linker needs to mprotect stack the slow way, e.g.
with main binary PT_GNU_STACK PF_R|PF_W, but some shared library
it depends on or dlopens doesn't have PT_GNU_STACK or has PF_X bit
set in its p_flags, ld.so ends up doing:
mprotect(0xbfffb000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = -1 EINVAL (Invalid argument)
mprotect(0xbfff4000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfff8000, 16384, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffa000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffb000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0xbfffa000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)

Patch for this is available in bug #127341.
(or if we have time, just move the PROT_GROWSDOWN definitions to
where they belong instead of the hack I put together in the hope
it could make RHEL3 U3 beta).

Comment 1 Ernie Petrides 2004-07-12 17:08:11 UTC
This seems like a reasonable feature request for U4.  It's
basically a back-port from 2.6.  I think the mprotect(2)
man page should also be updated.


Comment 2 Ingo Molnar 2004-08-18 11:26:09 UTC
Yep, agreed for U4, i'd suggest to apply the patch in #127341.

Comment 3 Ingo Molnar 2004-08-21 08:08:19 UTC
patch submitted for taroon.

Comment 4 Ernie Petrides 2004-08-31 18:59:07 UTC
The patch in comment #28 bug #127341 was committed to the RHEL3 U4
patch pool yesterday evening (in kernel version 2.4.21-20.1.EL).


Comment 5 John Flanagan 2004-12-20 20:55:37 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-550.html



Note You need to log in before you can comment on or make changes to this bug.