Bug 107307 - Exec Shield in 2.6 kernel causes random executable crashes
Summary: Exec Shield in 2.6 kernel causes random executable crashes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-16 19:04 UTC by Daniel Walsh
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-21 18:55:33 UTC
Type: ---
Embargoed:


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

Description Daniel Walsh 2003-10-16 19:04:18 UTC
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):
 2.6.0-0.test7.1.57

How reproducible:
Always

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 19:59:00 UTC
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 20:23:16 UTC
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 18:55:33 UTC
Seems to be fixed.


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