Bug 164945 - exec-shield sometimes fails to protect bss and data segments when executables are compiled with -pie
exec-shield sometimes fails to protect bss and data segments when executables...
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ingo Molnar
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-08-02 19:13 EDT by João Pedro
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-15 18:24:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description João Pedro 2005-08-02 19:13:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Epiphany/1.6.3

Description of problem:
While using paxtest  - http://pax.grsecurity.net/paxtest-0.9.7-pre4.tar.gz - I noticed some issues with executables compiled with the -pie option.
If the binaries are compiled normally - without -pie - the tests run as expected, instead if we activate it, the bss and data tests sometimes fail, indicating that exec-shield is not protecting those areas.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. wget http://pax.grsecurity.net/paxtest-0.9.7-pre4.tar.gz
2. tar -zxf paxtest-0.9.7-pre4.tar.gz
3. cd paxtest-0.9.7-pre4
4. gcc -pie body.c execbss.c -o execbss -lpthread
5. gcc -pie body.c execdata.c -o execdata -lpthread
6. ./execbss
7. ./execdata

Actual Results:  Executable bss                           : Vulnerable
Executable data                          : Vulnerable

Expected Results:  Executable bss                           : Killed
Executable data                          : Killed

Additional info:

$ cat /proc/sys/kernel/exec-shield
$ cat /proc/sys/kernel/randomize_va_space
Comment 1 Ingo Molnar 2005-09-15 18:24:58 EDT
this is fixed in the latest update kernel.

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