bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/21136] New: readelf segfault - heap buffer overflow


From: thuanpv at comp dot nus.edu.sg
Subject: [Bug binutils/21136] New: readelf segfault - heap buffer overflow
Date: Mon, 13 Feb 2017 09:03:40 +0000

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

            Bug ID: 21136
           Summary: readelf segfault - heap buffer overflow
           Product: binutils
           Version: 2.29 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: thuanpv at comp dot nus.edu.sg
  Target Milestone: ---

Created attachment 9803
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9803&action=edit
Crashing input

Dear all,

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

This bug was found on Ubuntu 14.04 64-bit & binutils was checkout from main
repository at git://sourceware.org/git/binutils-gdb.git. Its commit is
53f7e8ea7fad1fcff1b58f4cbd74e192e0bcbc1d (Fri Feb 10 00:00:16 2017) 

To reproduce:
Download the attached file - bug_2
readelf -da bug_2

Valgrind says:
==29176== Invalid read of size 8
==29176==    at 0x408B77: target_specific_reloc_handling (readelf.c:11638)
==29176==    by 0x408B77: apply_relocations (readelf.c:12343)
==29176==    by 0x4178B4: process_notes_at.part.19 (readelf.c:16279)
==29176==    by 0x423D91: process_notes_at (readelf.c:16415)
==29176==    by 0x423D91: process_note_sections (readelf.c:16526)
==29176==    by 0x423D91: process_notes (readelf.c:16559)
==29176==    by 0x423D91: process_object (readelf.c:16782)
==29176==    by 0x402111: process_file (readelf.c:17154)
==29176==    by 0x402111: main (readelf.c:17225)
==29176==  Address 0x20052093a0 is not stack'd, malloc'd or (recently) free'd
==29176== 
==29176== 
==29176== Process terminating with default action of signal 11 (SIGSEGV)
==29176==  Access not within mapped region at address 0x20052093A0
==29176==    at 0x408B77: target_specific_reloc_handling (readelf.c:11638)
==29176==    by 0x408B77: apply_relocations (readelf.c:12343)
==29176==    by 0x4178B4: process_notes_at.part.19 (readelf.c:16279)
==29176==    by 0x423D91: process_notes_at (readelf.c:16415)
==29176==    by 0x423D91: process_note_sections (readelf.c:16526)
==29176==    by 0x423D91: process_notes (readelf.c:16559)
==29176==    by 0x423D91: process_object (readelf.c:16782)
==29176==    by 0x402111: process_file (readelf.c:17154)
==29176==    by 0x402111: main (readelf.c:17225)

ASAN says
==30126==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x61900000ee00 at pc 0x54aa2e bp 0x7ffcee43fc30 sp 0x7ffcee43fc28
READ of size 8 at 0x61900000ee00 thread T0
    #0 0x54aa2d in target_specific_reloc_handling
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:11637
    #1 0x52e6dc in apply_relocations
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:12343
    #2 0x527e5f in process_notes_at
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:16279
    #3 0x52616c in process_note_sections
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:16526
    #4 0x4e1ec2 in process_notes
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:16559
    #5 0x48d646 in process_object
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:16782
    #6 0x488365 in process_file
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:17154
    #7 0x4855c3 in main
/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/../../binutils/readelf.c:17225
    #8 0x7fef50e75f44 (/lib/x86_64-linux-gnu/libc.so.6+0x21f44)
    #9 0x47ddfc in _start
(/home/ubuntu/thesis/subjects/binutils-newest/build-asan/binutils/readelf+0x47ddfc)

-- 
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]