]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Make sure all attributes come with a (fake) CU for bound checks.
authorMark Wielaard <mjw@redhat.com>
Fri, 12 Dec 2014 15:43:04 +0000 (16:43 +0100)
committerMark Wielaard <mjw@redhat.com>
Wed, 17 Dec 2014 15:35:56 +0000 (16:35 +0100)
commit9202665816763fad8524dd78a664dbcaa157b8d4
treea895bade664b2701de624f57d5c79a69ebcd7004
parent274cbda6f5d5b7c57d488edaeb55876ba8705db3
libdw: Make sure all attributes come with a (fake) CU for bound checks.

All attributes now have a reference to a (fake) CU that has startp and
endp set to the data section where the form data comes from. Use that
for bounds checking in __libdw_form_val_len and dwarf_formblock to make
sure data read doesn't overflow any data section. Remove libdwP.h cu_data
and use cu startp and endp directly where appropriate.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
14 files changed:
libdw/ChangeLog
libdw/dwarf_begin_elf.c
libdw/dwarf_child.c
libdw/dwarf_end.c
libdw/dwarf_formblock.c
libdw/dwarf_formref_die.c
libdw/dwarf_getattrs.c
libdw/dwarf_getlocation.c
libdw/dwarf_getlocation_attr.c
libdw/dwarf_getlocation_implicit_pointer.c
libdw/dwarf_getmacros.c
libdw/libdwP.h
libdw/libdw_findcu.c
libdw/libdw_form.c