Re: Fuzzing elfutils

2014-12-07 Thread Alexander Cherepanov
On 2014-12-05 11:58, Mark Wielaard wrote: On Fri, 2014-12-05 at 02:10 +0300, Alexander Cherepanov wrote: On 2014-12-04 17:27, Mark Wielaard wrote: But I found that using such broad coverage makes the search space for the fuzzer really, really big. It can take days for the fuzzer to generate a s

Re: [PATCH] libdw: Add overflow checking to __libdw_form_val_len.

2014-12-07 Thread Petr Machata
Josh Stone writes: > I'll see if I can grab that old kernel debuginfo to do a more direct > comparison. You could grab the old code and compare that. If you're still in the 80's, it's the data, not the code. Thanks, Petr

Re: Fuzzing elfutils

2014-12-07 Thread Alexander Cherepanov
On 2014-12-04 19:03, Mark Wielaard wrote: On Thu, 2014-12-04 at 15:27 +0100, Mark Wielaard wrote: Thanks! We have been fixing various issues the last couple of weeks and I just pushed some my fixes to git master. So if you could retry against the very latest git checkout that would be very helpf

[PATCH] readelf: maximum operations per instruction cannot be zero in .debug_line.

2014-12-07 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/readelf.c | 8 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ccbd6e8..1c3cf2f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2014-12-07 Mark Wielaard + * reade

[PATCH] readelf: DW_OP_call_ref and DW_OP_GNU_implicit_pointer are invalid for CFA.

2014-12-07 Thread Mark Wielaard
print_cfa_program might call print_ops with zero offset size. We don't need (and don't know) the DWARF offset size in that case. DW_OP_call_ref and DW_OP_GNU_implicit_pointer need to know the offset size because they reference a DIE. But they are invalid when used from CFA. Signed-off-by: Mark Wie

[PATCH] libdwfl: Check actually used ehsize, shentsize and phentsize in relocate.c

2014-12-07 Thread Mark Wielaard
In relocate_section we check relocation sections don't overlap any of the ELF headers. We should check against the actually used ehsize, shentsize and phentsize. Not the possibly bogus values in the file ehdr itself. Signed-off-by: Mark Wielaard --- libdwfl/ChangeLog | 5 + libdwfl/relocat

[PATCH] libdwfl: Never relocate value against section zero (load address).

2014-12-07 Thread Mark Wielaard
This really is just a robustify patch in case section zero got the wrong section flags set. In that case __libdwfl_relocate_value might call dwfl_offline_section_address which might assert (because it isn't prepared to handle section zero). elf_nextscn will never see section zero. So be explicit in