public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/47656] New: libgo.so has writable executable stack
@ 2011-02-09  6:07 dirtyepic at gentoo dot org
  2012-01-27 23:08 ` [Bug go/47656] " ian at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dirtyepic at gentoo dot org @ 2011-02-09  6:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47656

           Summary: libgo.so has writable executable stack
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
        AssignedTo: ian@airs.com
        ReportedBy: dirtyepic@gentoo.org


For security reasons our package manager scans ELF files being installed for
writable executable stacks using scanelf (pax-utils).  libgo.so triggers this
warning.

$ scanelf -qe
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/libgo.so.0.0.0 
RWX --- ---  /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/libgo.so.0.0.0

$ eu-readelf -S
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/libgo.so.0.0.0 
There are 31 section headers, starting at offset 0x8975e0:

Section Headers:
[Nr] Name                 Type         Addr             Off      Size     ES
Flags Lk Inf Al
[ 0]                      NULL         0000000000000000 00000000 00000000  0   
    0   0  0
[ 1] .hash                HASH         0000000000000200 00000200 00014468  4 A 
    3   0  8
[ 2] .gnu.hash            GNU_HASH     0000000000014668 00014668 000181e4  0 A 
    3   0  8
[ 3] .dynsym              DYNSYM       000000000002c850 0002c850 000498a8 24 A 
    4   3  8
[ 4] .dynstr              STRTAB       00000000000760f8 000760f8 000b1074  0 A 
    0   0  1
[ 5] .gnu.version         GNU_versym   000000000012716c 0012716c 0000620e  2 A 
    3   0  2
[ 6] .gnu.version_r       GNU_verneed  000000000012d380 0012d380 000000e0  0 A 
    4   4  8
[ 7] .rela.dyn            RELA         000000000012d460 0012d460 002900b8 24 A 
    3   0  8
[ 8] .rela.plt            RELA         00000000003bd518 003bd518 0000edd8 24 A 
    3  10  8
[ 9] .init                PROGBITS     00000000003cc2f0 003cc2f0 00000018  0 AX
    0   0  4
[10] .plt                 PROGBITS     00000000003cc308 003cc308 00009ea0 16 AX
    0   0  4
[11] .text                PROGBITS     00000000003d61b0 003d61b0 001c5dbc  0 AX
    0   0 16
[12] .fini                PROGBITS     000000000059bf6c 0059bf6c 0000000e  0 AX
    0   0  4
[13] .rodata              PROGBITS     000000000059bf80 0059bf80 000607e2  0 A 
    0   0 32
[14] .eh_frame_hdr        PROGBITS     00000000005fc764 005fc764 0000b44c  0 A 
    0   0  4
[15] .eh_frame            PROGBITS     0000000000607bb0 00607bb0 0003b324  0 A 
    0   0  8
[16] .gcc_except_table    PROGBITS     0000000000642ed4 00642ed4 000027d5  0 A 
    0   0  4
[17] .tdata               PROGBITS     0000000000846020 00646020 00000008  0
WAT    0   0  8
[18] .tbss                NOBITS       0000000000846028 00646028 000000d0  0
WAT    0   0  8
[19] .ctors               PROGBITS     0000000000846028 00646028 00000020  0 WA
    0   0  8
[20] .dtors               PROGBITS     0000000000846048 00646048 00000010  0 WA
    0   0  8
[21] .jcr                 PROGBITS     0000000000846058 00646058 00000008  0 WA
    0   0  8
[22] .data.rel.ro         PROGBITS     0000000000846060 00646060 00122e88  0 WA
    0   0 32
[23] .dynamic             DYNAMIC      0000000000968ee8 00768ee8 000001e0 16 WA
    4   0  8
[24] .got                 PROGBITS     00000000009690c8 007690c8 00002f10  8 WA
    0   0  8
[25] .got.plt             PROGBITS     000000000096bfe8 0076bfe8 00004f60  8 WA
    0   0  8
[26] .data                PROGBITS     0000000000970f60 00770f60 00084390  0 WA
    0   0 32
[27] .bss                 NOBITS       00000000009f5300 007f52f0 00234bb8  0 WA
    0   0 32
[28] .go_export           PROGBITS     0000000000000000 007f52f0 000a21cf  0   
    0   0  1
[29] .gnu_debuglink       PROGBITS     0000000000000000 008974bf 0000001c  0   
    0   0  1
[30] .shstrtab            STRTAB       0000000000000000 008974db 00000102  0   
    0   0  1

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-unknown-linux-gnu/gcc-bin/4.6.0-pre9999/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.6.0_pre9999/work/gcc-4.6.0-9999/configure
--prefix=/usr --bindir=/usr/x86_64-unknown-linux-gnu/gcc-bin/4.6.0-pre9999
--includedir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/include
--datadir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999
--mandir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999/man
--infodir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0-pre9999/include/g++-v4
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu
--disable-altivec --disable-fixed-point --with-ppl --with-cloog
--disable-ppl-version-check --with-cloog-include=/usr/include/cloog-ppl
--enable-lto --disable-nls --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --disable-libmudflap --disable-libssp
--enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-unknown-linux-gnu/4.6.0-pre9999/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,go
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo SVN'
Thread model: posix
gcc version 4.6.0-pre9999 20110209 (experimental) rev. 169960 (Gentoo SVN)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug go/47656] libgo.so has writable executable stack
  2011-02-09  6:07 [Bug go/47656] New: libgo.so has writable executable stack dirtyepic at gentoo dot org
@ 2012-01-27 23:08 ` ian at gcc dot gnu.org
  2012-01-28  2:13 ` ian at airs dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ian at gcc dot gnu.org @ 2012-01-27 23:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47656

--- Comment #1 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2012-01-27 22:25:06 UTC ---
Author: ian
Date: Fri Jan 27 22:25:02 2012
New Revision: 183650

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183650
Log:
compiler: Use new __builtin_init_heap_trampoline.

    PR go/47656
    * builtins.def (BUILT_IN_INIT_HEAP_TRAMPOLINE): Define.
    * builtins.c (expand_builtin_init_trampoline): Add onstack
    parameter.  Change caller.
    (expand_builtin): Handle BUILT_IN_INIT_HEAP_TRAMPOLINE.
    * tree.c (build_common_builtin_nodes): Declare
    __builtin_init_heap_trampoline.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/builtins.def
    trunk/gcc/go/gofrontend/gogo-tree.cc
    trunk/gcc/tree.c


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug go/47656] libgo.so has writable executable stack
  2011-02-09  6:07 [Bug go/47656] New: libgo.so has writable executable stack dirtyepic at gentoo dot org
  2012-01-27 23:08 ` [Bug go/47656] " ian at gcc dot gnu.org
@ 2012-01-28  2:13 ` ian at airs dot com
  2012-01-28  4:06 ` dirtyepic at gentoo dot org
  2012-02-12  6:00 ` ian at airs dot com
  3 siblings, 0 replies; 5+ messages in thread
From: ian at airs dot com @ 2012-01-28  2:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47656

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
            Version|4.6.0                       |4.7.0
         Resolution|                            |FIXED

--- Comment #2 from Ian Lance Taylor <ian at airs dot com> 2012-01-27 23:37:24 UTC ---
Fixed on mainline.

Thanks for reporting it.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug go/47656] libgo.so has writable executable stack
  2011-02-09  6:07 [Bug go/47656] New: libgo.so has writable executable stack dirtyepic at gentoo dot org
  2012-01-27 23:08 ` [Bug go/47656] " ian at gcc dot gnu.org
  2012-01-28  2:13 ` ian at airs dot com
@ 2012-01-28  4:06 ` dirtyepic at gentoo dot org
  2012-02-12  6:00 ` ian at airs dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dirtyepic at gentoo dot org @ 2012-01-28  4:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47656

--- Comment #3 from Ryan Hill <dirtyepic at gentoo dot org> 2012-01-28 03:44:37 UTC ---
Thanks.  I'm guessing this builtin is new for 4.7?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug go/47656] libgo.so has writable executable stack
  2011-02-09  6:07 [Bug go/47656] New: libgo.so has writable executable stack dirtyepic at gentoo dot org
                   ` (2 preceding siblings ...)
  2012-01-28  4:06 ` dirtyepic at gentoo dot org
@ 2012-02-12  6:00 ` ian at airs dot com
  3 siblings, 0 replies; 5+ messages in thread
From: ian at airs dot com @ 2012-02-12  6:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47656

--- Comment #4 from Ian Lance Taylor <ian at airs dot com> 2012-02-12 05:59:42 UTC ---
Yes, __builtin_init_heap_trampoline is new for 4.7.  Sorry for not answering
earlier, I missed the e-mail message somehow.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-12  6:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09  6:07 [Bug go/47656] New: libgo.so has writable executable stack dirtyepic at gentoo dot org
2012-01-27 23:08 ` [Bug go/47656] " ian at gcc dot gnu.org
2012-01-28  2:13 ` ian at airs dot com
2012-01-28  4:06 ` dirtyepic at gentoo dot org
2012-02-12  6:00 ` ian at airs dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).