bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/21418] New: ar segfault - null pointer dereferencing


From: dungnguy at comp dot nus.edu.sg
Subject: [Bug binutils/21418] New: ar segfault - null pointer dereferencing
Date: Sat, 22 Apr 2017 06:50:29 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21418

            Bug ID: 21418
           Summary: ar segfault - null pointer dereferencing
           Product: binutils
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: dungnguy at comp dot nus.edu.sg
  Target Milestone: ---

Dear All,

This bug was found with AFLGo, a directed version of AFL/AFLFast. Thanks also
to Marcel Böhme and Van-Thuan Pham.

This bug was found on Ubuntu 14.04 64-bit & binutils was checked out from main
repository at git://sourceware.org/git/binutils-gdb.git. Its commit is
a6c21d4a553de184562fd8409a5bcd3f2cc2561a (Wed Apr 19 13:16:05 2017).

binutils was built with ASAN using gcc-6.2 and clang-3.4. The configure command
was:

CC=clang CFLAGS="-DFORTIFY_SOURCE=2 -fstack-protector-all
-fsanitize=undefined,address -fno-omit-frame-pointer -g -Wno-error"
../configure --disable-shared --disable-gdb --disable-libdecnumber
--disable-readline --disable-sim

To reproduce:
ar -dN

ASAN says:
==148387==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc
0x7f956a8b6467 bp 0x000000000000 sp 0x7ffc9ba1d910 T0)
    #0 0x7f956a8b6466 in __GI_____strtol_l_internal
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/../stdlib/strtol_l.c:289
    #1 0x4985f7 in __interceptor_atoi
(/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/ar+0x4985f7)
    #2 0x4e7a23 in main
/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/../../binutils/ar.c:785:27
    #3 0x7f956a89af44 in __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287
    #4 0x4c9fbc in _start
(/home/ubuntu/binutils-analysis/binutils-gdb/obj-asan/binutils/ar+0x4c9fbc)

VALGRIND says:
==148392== Invalid read of size 1
==148392==    at 0x5078467: ____strtol_l_internal (strtol_l.c:298)
==148392==    by 0x5074EAF: atoi (atoi.c:27)
==148392==    by 0x405F20: main (ar.c:785)
==148392==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==148392== 
==148392== 
==148392== Process terminating with default action of signal 11 (SIGSEGV)
==148392==  Access not within mapped region at address 0x0
==148392==    at 0x5078467: ____strtol_l_internal (strtol_l.c:298)
==148392==    by 0x5074EAF: atoi (atoi.c:27)
==148392==    by 0x405F20: main (ar.c:785)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]