Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 246613

Summary: sys-apps/grep-2.5.3-r1: TEXTREL makes grep unusable
Product: Gentoo Linux Reporter: Hugo Mildenberger <Hugo.Mildenberger>
Component: HardenedAssignee: The Gentoo Linux Hardened Team <hardened>
Status: RESOLVED INVALID    
Severity: critical CC: zorry
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Hugo Mildenberger 2008-11-13 13:59:28 UTC
The above mentioned ebuild results in grep being unusable. Once installed, all subsequent builds will fail on a hardened, pax enabled system, since grep is
called by any configure script

Reproducible: Always

Steps to Reproduce:
1. emerge sys-apps/grep-2.5.3-r1
2. run grep
Actual Results:  
"grep: error while loading shared libraries: cannot make segment writable for relocation: Permission denied"


paxctl -m /usr/bin/grep makes grep usable again. 

/bin/fgrep and /bin/egrep are not affected by this bug.
Comment 1 Hugo Mildenberger 2008-11-13 14:01:12 UTC
Sorry, should read:

paxctl -m /bin/grep makes grep usable again
Comment 2 Gordon Malm (RETIRED) gentoo-dev 2008-11-13 16:17:42 UTC
emerge --info please.
Comment 3 Magnus Granberg gentoo-dev 2008-11-15 02:23:51 UTC
Can you try to use the stable version of grep?
Comment 4 Hugo Mildenberger 2008-11-16 16:11:40 UTC
(In reply to comment #3)
> Can you try to use the stable version of grep?
> 

I have difficulties to reproduce the situation at all, after I somehow lost the gcc-4.3.2 p1.1 from xake toolchain. When I re-emerged this version, and then re-emerged grep, the problem was gone. However, if you look at the grep makefile and sources, you would not wonder that it could trigger such instabilities (egrep and fgrep ok, but grep shows textrels). egrep and fgrep are one-line programs : #include "grep.c"
Comment 5 Gordon Malm (RETIRED) gentoo-dev 2008-11-16 17:31:14 UTC
Soo uhh, yeah.