]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - binutils/dwarf.h
More fixes for invalid memory accesses triggered by fuzzed binaries.
authorNick Clifton <nickc@redhat.com>
Mon, 5 Jan 2015 13:54:22 +0000 (13:54 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 5 Jan 2015 13:54:22 +0000 (13:54 +0000)
commit82b1b41bcdc6d01fdbd94b246e24a8a8f8c2bddd
tree757eaffeeb7a220f257326d6d7e366d0713187be
parentc1724c7fd39d85ccc1f94a0cd7bc25b19aa43ffd
More fixes for invalid memory accesses triggered by fuzzed binaries.

PR binutils/17531
* dwarf.c (alloc_num_debug_info_entries): New variable.
(process_debug_info): Set it.  Use it to avoid displaying
attributes for which there is no info.
(display_debug_abbrev): Check that the debug_info_entry index is
valid before using it.
(display_loc_list_dwo): Likewise.
(process_cu_tu_index): Add range check for an overlarge dw_sect
value.
(free_debug_memory): Reset alloc_num_debug_info_entries.
* readelf.c (slurp_ia64_unwind_table): Warn if the reloc could not
be indentified.
(dynamic_section_mips_val): Warn if the timestamp is invalid.
(print_mips_got_entry): Add a data_end parameter.  Warn if a read
would go beyond the end of the data, and return an error value.
(process_mips_specific): Do not read options from beyond the end
of the section.
Correct code to display optional data at the end of an option.
Warn if there are too many GOT symbols.
Update calls to print_mips_got_entry, and handle error returns.
binutils/ChangeLog
binutils/dwarf.c
binutils/dwarf.h
binutils/readelf.c