bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/20930] New: STRIP crashes when mapping over sections


From: boehme.marcel at gmail dot com
Subject: [Bug binutils/20930] New: STRIP crashes when mapping over sections
Date: Tue, 06 Dec 2016 04:36:45 +0000

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

            Bug ID: 20930
           Summary: STRIP crashes when mapping over sections
           Product: binutils
           Version: 2.28 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: boehme.marcel at gmail dot com
  Target Milestone: ---

Dear all,

The following bug was found with AFLFast, a fork of AFL, in a 24 hour fuzzing
session on Binutils. Thanks also to Van-Thuan Pham.

Objcopy/Strip crashes with an invalid read of size 4 for the following
execution on Ubuntu 16.04 x86_64 in Binutils trunk and for preinstalled version
v2.26.1 and on Ubuntu 14.04 x86_64 for Binutils in trunk and preinstalled
version v2.24.

$ printf
"\xcc\x00\x000\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x000\x10\x00\x00\x000000\x10\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00000000000000000000"
> test
$ strip -d test

UBSAN says:
./../binutils/objcopy.c:3559:34: runtime error: member access within null
pointer of type 'struct bfd_symbol' 

VALGRIND says:
==140585== Invalid read of size 4
==140585==    at 0x41C164: mark_symbols_used_in_relocations (objcopy.c:3559)
==140585==    by 0x503A53: bfd_map_over_sections (section.c:1395)
==140585==    by 0x427923: copy_object.part.18 (objcopy.c:2398)
==140585==    by 0x42F645: copy_object (objcopy.c:1849)
==140585==    by 0x42F645: copy_file (objcopy.c:2879)
==140585==    by 0x41670E: strip_main (objcopy.c:3790)
==140585==    by 0x41670E: main (objcopy.c:4890)
==140585==  Address 0x18 is not stack'd, malloc'd or (recently) free'd

Best regards,
- Marcel

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