Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 107307 - Exec Shield in 2.6 kernel causes random executable crashes
Exec Shield in 2.6 kernel causes random executable crashes
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-10-16 15:04 EDT by Daniel Walsh
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-21 14:55:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer program for kernel stack bug (1021 bytes, text/plain)
2003-10-16 15:58 EDT, Roland McGrath
no flags Details
fix for overflow in expand_stack rlimit check (1.17 KB, patch)
2003-10-16 16:23 EDT, Roland McGrath
no flags Details | Diff

  None (edit)
Description Daniel Walsh 2003-10-16 15:04:18 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030927

Description of problem:
System seems unstable with 2.6 kernel and exec shield installed.  I have seen
emacs, find, gcc and prelink fail with segfaults.

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

How reproducible:

Steps to Reproduce:
1.Install  2.6.0-0.test7.1.57 kernel
2. set /proc/sys/kernel/exec_shield to 1
3. run rpmbuild --rebuild prelink*src.rpm
4. Build crashes
5. set /proc/sys/kernel/exec_shield to 0
6. run rpmbuild --rebuild prelink*src.rpm
7. Build succeeds

Actual Results:  Seg faults

Expected Results:  No Seg Faults

Additional info:

I am doing this testing on an box with SELinux enabled.  Although I have turned
off the SELinux and still seen this behaviour.  The crashes do not happen in the
same place ever time.  I have started emacs had it crash and recall command and
it works.
Comment 1 Roland McGrath 2003-10-16 15:59:00 EDT
Created attachment 95234 [details]
reproducer program for kernel stack bug

This test program reproduces the bug every time run with an argument >= 2.
This happens for me even with /proc/sys/kernel/exec-shield set to 0,
on kernel-smp-2.6.0-0.test7.1.59.i686 (on dual PIII).
It does not happen with my own build of vanilla 2.6.
Comment 2 Roland McGrath 2003-10-16 16:23:16 EDT
Created attachment 95237 [details]
fix for overflow in expand_stack rlimit check

I think I got it by dead reckoning.  When the limit is set to RLIM_INFINITY,
the check in expand_stack will overflow and give a false positive.

I haven't tried this patch, but it probably fixes it.
Comment 3 Daniel Walsh 2004-09-21 14:55:33 EDT
Seems to be fixed.

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