Red Hat Bugzilla – Bug 107307
Exec Shield in 2.6 kernel causes random executable crashes
Last modified: 2007-11-30 17:10:32 EST
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):
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
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
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.
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.
Seems to be fixed.