Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42301 - programs segfault on a fresh hardened stage install
Summary: programs segfault on a fresh hardened stage install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-20 14:03 UTC by Guy Martin (RETIRED)
Modified: 2004-03-01 06:53 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 Guy Martin (RETIRED) gentoo-dev 2004-02-20 14:03:11 UTC
cd src; ../conf_script Makefile
Creating Makefile from Makefile.in
cd src; make
make[1]: Entering directory `/var/tmp/portage/man-1.5l-r6/work/man-1.5l/src'
gcc -O2 -mcpu=i586 -fomit-frame-pointer -pipe  -s  makemsg.c   -o makemsg
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.2/../../../../i586-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000008048550
./makemsg ../msgs/mess.en gripedefs.h msg.c
make[1]: *** [gripedefs.h] Segmentation fault
make[1]: Leaving directory `/var/tmp/portage/man-1.5l-r6/work/man-1.5l/src'
make: *** [source] Error 2

!!! ERROR: sys-apps/man-1.5l-r6 failed.
!!! Function src_compile, Line 78, Exitcode 2
!!! emake failed


This is one of the many segfault I have on this fresh chroot.
I guess the problem comes from the linking warning which pops up all the time.
This is the second fresh install I tried. In the first chroot, awk was segfaulting but not this time. the only difference was -ffast-math added and -pipe removed in the first install.

gmsoft portage # emerge info
Portage 2.0.50-r1 (hardened-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.24-xfs)
=================================================================
System uname: 2.4.24-xfs i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.3.13
Autoconf:
Automake:
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i586 -fomit-frame-pointer -pipe"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"  
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i586 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="berkdb crypt ipv6 nls pam pic readline ssl tcpd x86 zlib"

With this stage : stage1-x86-pie-ssp-2004.0-20040210.tar.bz2


others fun stuff on the same system :
gmsoft portage # file /lib/libc-2.3.2.so 
/lib/libc-2.3.2.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
gmsoft portage # nm /lib/libc-2.3.2.so 
nm: /lib/libc-2.3.2.so: no symbols
gmsoft portage # 


To be complete, this chroot was done on my athlon and was destinated to a p100.
Comment 1 solar (RETIRED) gentoo-dev 2004-02-20 16:17:12 UTC
I think this is a temp upgrade here that's getting in your way while your system updated to support shared pic executables. I assume as a workaround you can update glibc first. (disable hgcc if needed)

Our best solution I see for the hardened stages is to deploy new ones that have everything current. 

So zhen whatcha think? New stages with current toolchain gcc-3.3.2 ?
Comment 2 Georgi Georgiev 2004-02-22 10:46:37 UTC
Could this be related to bug #36099?
Comment 3 Alexander Gabert (RETIRED) gentoo-dev 2004-03-01 06:53:09 UTC
yes, this is the problem with hardened-gcc shell script manipulating (truncating) a newer incompatible gcc specs.

masking hardened-gcc and blocking it in the profile, additionally blocking the hardened-gcc when installing gcc will be the solution to all subsequent problems we have here.

i leave that decision to the discretion of all involved hardened people but i think i will do it this evening after we have talked about it at the team.

Alex