Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104284 - 2005.1 (.0, and prev) ghostscript AMD64 + hardened/pic/pie/ssp, segfault with pie
Summary: 2005.1 (.0, and prev) ghostscript AMD64 + hardened/pic/pie/ssp, segfault with...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-30 11:07 UTC by Craig Metz
Modified: 2005-11-29 13:51 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 Craig Metz 2005-08-30 11:07:47 UTC
If I build ghostscript on an AMD64 system built with hardened, pic, pie, and ssp
all enabled, and run "gs" from the command line, I get a copyright notice
followed by a segfault. If I recompile ghoscript after using gcc-config to
switch to gcc -hardenednopie, gs works fine. I have encountered this with
2005.1, .0, and previous versions.

Reproducible: Always
Steps to Reproduce:
1. /etc/make.conf: USE="hardened pic pie" CFLAGS="-fstack-protector" and install
a hardened system
2. emerge ghostscript
3. gs


Actual Results:  
segfault

Expected Results:  
GS>
Comment 1 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-04 00:08:34 UTC
Did you try it with -hardenednossp?  We've seen a couple of cases where things
work with pie or ssp, but not both; it'd be useful to know if that's also the
case here.
Comment 2 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-04 00:12:51 UTC
btw when using -hardened or -hardenednopie, don't put -fstack-protector in
CFLAGS; the compiler does this automatically.  In fact, don't ever put
-fstack-protector in CFLAGS, use the -hardened compiler otherwise stuff will break.

Also, please paste the output of 'emerge --info'
Comment 3 solar (RETIRED) gentoo-dev 2005-11-29 13:33:31 UTC
Marking bug as INVALID.

user has -fstack-protector in CFLAGS (not a hardened bug)
Comment 4 Dan Johansson 2005-11-29 13:51:37 UTC
(In reply to comment #3)
> Marking bug as INVALID.
> 
> user has -fstack-protector in CFLAGS (not a hardened bug)

Sorry to come in this late, but I also just got bitten by this bug (and I do not 
have -fstack-protector in my CFLAGS - I do have USE=hardened)
If I choose the x86_64-pc-linux-gnu-3.4.4-vanilla GCC-config gs works without 
problem.

Here's my emerge --info
Portage 2.0.51.22-r3 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.
6.14-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.14-gentoo-r2 x86_64 AMD Athlon(tm) 64 Processor 3800+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/
fax /usr/share/config /var/bind /var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
MAKEOPTS="-j2"
PKGDIR="/var/pkgdir"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://prince.dmj.nu/gentoo-portage"
USE="amd64 apache2 avi bash-completion berkdb bitmap-fonts bzip2 crypt cups curl 
eds emboss encode expat fam fax foomaticdb fortran gdbm gif gmp gstreamer 
hardened idn imlib jpeg lzw lzw-tiff mp3 mpeg ncurses nls no-htdocs opengl 
pdflib perl png ppds python quicktime readline samba scanner sdl ssl tcpd tiff 
truetype-fonts type1-fonts udev usb userlocales xml2 xpm xv zlib userland_GNU 
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

Regards,
--Dan