Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89591 - sys-devel/gcc-3.4.3.20050110-r2 cc1: stack smashing attack in function ix86_split_to_parts()
Summary: sys-devel/gcc-3.4.3.20050110-r2 cc1: stack smashing attack in function ix86_s...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-18 16:25 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2005-06-08 03:43 UTC (History)
0 users

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 DEMAINE Benoît-Pierre, aka DoubleHP 2005-04-18 16:25:42 UTC
while re emerging gcc:

stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -c    -O2 -march=athlon-mp -pipe -fprofile-generate -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition     -DHAVE_CONFIG_H    -I. -I. -I/var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc -I/var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc/. -I/var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc/../include  /var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc/postreload.c -o postreload.o
stage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -c    -O2 -march=athlon-mp -pipe -fprofile-generate -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition     -DHAVE_CONFIG_H    -I. -I. -I/var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc -I/var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc/. -I/var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc/../include  /var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3/gcc/predict.c -o predict.o
cc1: stack smashing attack in function ix86_split_to_parts()
{standard input}: Assembler messages:
{standard input}:0: Warning: end of file not at end of a line; newline inserted
xgcc: Internal error: Aborted (program cc1)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[2]: *** [predict.o] Error 1
make[2]: Leaving directory `/home/Gentoo/var_tmp/portage/gcc-3.4.3.20050110-r2/work/build/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/home/Gentoo/var_tmp/portage/gcc-3.4.3.20050110-r2/work/build/gcc'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.3.20050110-r2 failed.

using flags:

CFLAGS="-O2 -march=athlon-mp -fomit-frame-pointer -pipe"        #-mcpu=i686
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
ACCEPT_KEYWORDS="~x86"
USE="ssl fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 
3dnow gtk apache2 X alsa oss esd arts ipv6 serial ncurses gpm perl python samba aalib libcaca mysql postgres vim
nptl pcre xprint gnutls mpi plotutils hdf5 gd graphviz lcms jbig fpx wmf fftw
lirc fbcon rtc v4l xvid krb4 -hardened flac sndfile -fusion djbfft slang live lzo dts matroska mythtv tga theora v4l2 xanim xvmc 3dnowex vorbis font-server
kerberos snmp elf bzlib ftp posix sysvipc xmlrpc xpm dba berkdb
unicode ldap javascript threads doc escreen etwin java libclamav xml pnp rrdtool cairo caps pcmcia ethereal
dvb dvd dvdread real dv directfb divx4linux sysfs mmap odbc streamzap
tetex tiff mozilla xmms skey
-debug -static -xprint -sdk -emacs -ifc -ggi -cjk -tcltk -fam -slp -nas -minimal
-xinerama -nojoystick -novideo -noaudio -gnome -kde"
Comment 1 DEMAINE Benoît-Pierre, aka DoubleHP 2005-04-18 16:28:58 UTC
maybe you want details:

emerge -v gcc -p                
[ebuild   R   ] sys-devel/gcc-3.4.3.20050110-r2  (-altivec) -bootstrap -boundschecking -build -debug +fortran -gcj +gtk -hardened* (-ip28) (-multilib) -multislot (-n32) (-n64) +nls -nocxx -objc -static (-uclibc) 0 kB 

# equery uses gcc
[ Searching for packages matching gcc... ]
[ Colour Code : set unset ]
[ Legend    : Left column  (U) - USE flags from make.conf              ]
[           : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for sys-devel/gcc-3.4.3.20050110-r2 ]
 U I
 - - debug          : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too
 - - static         : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically
 + + nls            : <unknown>
 - - bootstrap      : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during original system bootstrapping
 - - build          : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping.
 - - multislot      : Allow for SLOTs to include minor version (3.3.4 instead of just 3.3)
 - - multilib       : On 64bit systems, if you want to be able to compile 32bit and 64bit binaries
 - - gcj            : Enable building with gcj
 + + gtk            : Adds support for x11-libs/gtk+ (The GIMP Toolkit)
 + + fortran        : Adds support for fortran (formally f77)
 - - nocxx          : Disable support for C++ (DONT USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)
 - - objc           : Build support for the Objective C code language
 - + hardened       : activate default security enhancements for toolchain (gcc, glibc, binutils)
 - - uclibc         : Enable uclibc specific patches and build or link uclibc
 - - n32            : Enable n32 ABI support on mips
 - - n64            : Enable n64 ABI support on mips
 - - ip28           : Enable building a compiler capable of building an SGI IP28 kernel
 - - altivec        : Adds support for optimizations for G4 and G5/ppc970 processors
 - - boundschecking : add bounds checking patch by Haj Ten Brugge, this will DISABLE the hardened PIE+SSP patches
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2005-04-22 18:28:20 UTC
After emerging a prebuild version, I have been able to exit tha bug:
- emerge a prebuild
- select the gcc profile of prebuild
- emerge gcc
- select profile of newly emerged gcc.

I close it, but I still think any one could have the same bug ... and that a hardened gcc can not be used to compile a non hardened gcc.
Comment 3 Nathan Sullivan 2005-06-08 03:43:29 UTC
Same issue as bug 78618?

http://bugs.gentoo.org/show_bug.cgi?id=78618