]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - binutils/readelf.c
Avoid allocating over-large buffers when parsing corrupt binaries.
authorNick Clifton <nickc@redhat.com>
Fri, 31 Oct 2014 16:36:31 +0000 (16:36 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 31 Oct 2014 16:36:31 +0000 (16:36 +0000)
commitf54498b45795194df671207c6ef3d6cd6d0c0ebb
tree940ab0d69864094f00b010c1c678f3701bb6087f
parentfe06005387223e8a8b37e49036efe06b4062c7f4
Avoid allocating over-large buffers when parsing corrupt binaries.

PR binutils/17512
* coffgen.c (_bfd_coff_get_external_symbols): Do not try to load a
symbol table bigger than the file.
* elf.c (bfd_elf_get_str_section): Do not try to load a string
table bigger than the file.

* readelf.c (process_program_headers): Avoid memory exhaustion due
to corrupt values in a dynamis segment header.
(get_32bit_elf_symbols): Do not attempt to read an over-large
section.
(get_64bit_elf_symbols): Likewise.
bfd/ChangeLog
bfd/coffgen.c
bfd/elf.c
binutils/ChangeLog
binutils/readelf.c