]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Add missing size check to parse_eh_frame_hdr.
authorMark Wielaard <mjw@redhat.com>
Fri, 2 Jan 2015 23:27:58 +0000 (00:27 +0100)
committerMark Wielaard <mjw@redhat.com>
Thu, 15 Jan 2015 13:14:21 +0000 (14:14 +0100)
commit9ceebe690f94f24186280e1b38ed5770bf436686
treeb0b4c6c8d5141e2870c6b9413a08d94e318f5e8d
parent5316e412a4931d99ac5611e5f89ef187d4e9e335
libdw: Add missing size check to parse_eh_frame_hdr.

afl-fuzz showed that when parse_eh_frame_hdr was called from
getcfi_scn_eh_frame invalid data could be read because of a missing size
check. That check was there when parse_eh_frame_hdr was called from
getcfi_gnu_eh_frame. Move the size check into parse_eh_frame. And add
an extra check to make sure d_buf is not NULL.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdw/ChangeLog
libdw/dwarf_getcfi_elf.c