Skip to content

Stack-buffer overflow in the linker #925

@gopherbot

Description

@gopherbot

by robert.swiecki:

What steps will reproduce the problem?
1. Run 'MALLOC_CHECK_=3 6g
SIGABRT.PC.0x7ffff7a8ca75.CODE.-6.ADDR.0x1102000004386.INSTR.cmp_rax,_0xfffff000.6'

What is the expected output?
Error or an a.out file

What do you see instead?
SIGABRT from the glibc

What is your $GOOS?  $GOARCH?

amd64/linux

Which revision are you using?  (hg identify)

5992bf56aa72 tip

Please provide any additional information below.

Please run with MALLOC_CHECK_=3 or under valgrind

My output

$ /usr/local/google/src/go/6l
SIGABRT.PC.0x7ffff7a8ca75.CODE.-6.ADDR.0x1102000004386.INSTR.cmp_rax,_0xfffff000.6 
*** stack smashing detected ***: /usr/local/google/src/go/6l terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7ff874824207]
/lib/libc.so.6(__fortify_fail+0x0)[0x7ff8748241d0]
/usr/local/google/src/go/6l[0x40afee]
/usr/local/google/src/go/6l[0x407293]
/usr/local/google/src/go/6l[0x4078be]
/usr/local/google/src/go/6l[0x40b615]
/usr/local/google/src/go/6l[0x412869]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7ff874743c4d]
/usr/local/google/src/go/6l[0x401219]
======= Memory map: ========
00400000-0041f000 r-xp 00000000 08:06 2730100                           
/usr/local/google/src/go/6l
0061e000-0061f000 r--p 0001e000 08:06 2730100                           
/usr/local/google/src/go/6l
0061f000-00628000 rw-p 0001f000 08:06 2730100                           
/usr/local/google/src/go/6l
00628000-00648000 rw-p 00000000 00:00 0 
00b67000-00b88000 rw-p 00000000 00:00 0                                  [heap]
7ff873b0d000-7ff873b23000 r-xp 00000000 08:01 1351719                   
/lib/libgcc_s.so.1
7ff873b23000-7ff873d22000 ---p 00016000 08:01 1351719                   
/lib/libgcc_s.so.1
7ff873d22000-7ff873d23000 r--p 00015000 08:01 1351719                   
/lib/libgcc_s.so.1
7ff873d23000-7ff873d24000 rw-p 00016000 08:01 1351719                   
/lib/libgcc_s.so.1
7ff873d24000-7ff874725000 rw-p 00000000 00:00 0 
7ff874725000-7ff87489f000 r-xp 00000000 08:01 1352099                   
/lib/libc-2.11.1.so
7ff87489f000-7ff874a9e000 ---p 0017a000 08:01 1352099                   
/lib/libc-2.11.1.so
7ff874a9e000-7ff874aa2000 r--p 00179000 08:01 1352099                   
/lib/libc-2.11.1.so
7ff874aa2000-7ff874aa3000 rw-p 0017d000 08:01 1352099                   
/lib/libc-2.11.1.so
7ff874aa3000-7ff874aa8000 rw-p 00000000 00:00 0 
7ff874aa8000-7ff874ac8000 r-xp 00000000 08:01 1352096                   
/lib/ld-2.11.1.so
7ff874ca4000-7ff874ca7000 rw-p 00000000 00:00 0 
7ff874cc6000-7ff874cc8000 rw-p 00000000 00:00 0 
7ff874cc8000-7ff874cc9000 r--p 00020000 08:01 1352096                   
/lib/ld-2.11.1.so
7ff874cc9000-7ff874cca000 rw-p 00021000 08:01 1352096                   
/lib/ld-2.11.1.so
7ff874cca000-7ff874ccb000 rw-p 00000000 00:00 0 
7fffa9247000-7fffa925c000 rw-p 00000000 00:00 0                          [stack]
7fffa93ff000-7fffa9400000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

Attachments:

  1. SIGABRT.PC.0x7ffff7a8ca75.CODE.-6.ADDR.0x1102000004386.INSTR.cmp_rax,_0xfffff000.6 (105867 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions