Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52002 - Every program compiled after installing binutils-2.14.90.0.8-r1 crashes with a segmentation fault (kernel 2.6.5-hardened-r3)
Summary: Every program compiled after installing binutils-2.14.90.0.8-r1 crashes with ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-25 05:46 UTC by dirkjan_bussink
Modified: 2004-09-09 01:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dirkjan_bussink 2004-05-25 05:46:18 UTC
I'm running kernel 2.6.5-hardened-r3 and after I installed binutils-2.14.90.0.8-r1 every application that I compiled after installing that version of binutils segfaults at startup. 
The compiled application however, does work on a 2.6.5-gentoo-r1 kernel. I think it has something to with PaX and/or Grsecurity (both are used in the 2.6.5-hardened-r3 kernel).
Downgrading binutils to binutils-2.14.90.0.7-r4 fixed the problem. 

Reproducible: Always
Steps to Reproduce:
1. Run kernel 2.6.5-hardened-r3 (or any other kernel with PaX and Grsecurity enabled)
2. emerge =binutils-2.14.90.0.8-r1 
3. compile any C program and see it segfaults immediately
Comment 1 Simon Strandman 2004-06-10 13:48:18 UTC
Do you have -fomit-frame-pointer in your CFLAGS? If so try to rebuild binutils without it. binutils-2.14.90.0.8-r1.ebuild doesn't strip that flag as i should. 

This patch fixes it:

--- binutils-2.14.90.0.8-r1.ebuild.orig	2004-06-10 22:37:14.385788080 +0200
+++ binutils-2.14.90.0.8-r1.ebuild	2004-06-10 22:21:45.000000000 +0200
@@ -52,7 +52,7 @@
 
 src_compile() {
 	# Generate borked binaries.  Bug #6730
-	filter-flags "-fomit-frame-pointer -fssa"
+	filter-flags -fomit-frame-pointer -fssa
 
 	local myconf=
 	[ ! -z "${CBUILD}" ] && myconf="--build=${CBUILD}"
Comment 2 dirkjan_bussink 2004-06-10 23:54:41 UTC
I tried this, but it doesn't fix the problem. The problem is still exactly the same. I think there is something more wrong, the linker probably creates binaries that violate some sort of PaX or grsecurity option I enabled. 
Comment 3 solar (RETIRED) gentoo-dev 2004-09-08 18:34:25 UTC
Sounds like bad hardware. That version of binutils is KNOWN to be a good one.
Comment 4 dirkjan_bussink 2004-09-09 01:04:17 UTC
Bad hardware would be very weird, because the problem never came up earlier. I have been able to solve it now, I think that is because of an updated version with a newer version of the grsecurity patches. There was probably a bug in that somewhere, because I have this version of binutils working now.