[Bug,tools/33004] Stack Buffer Underflow in eu-unstrip's sections_match Function
Commit Message
https://sourceware.org/bugzilla/show_bug.cgi?id=33004
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
I cannot replicate this.
But running under valgrind does show some "Conditional jump or move depends on
uninitialised value(s)" issues before showing:
eu-unstrip: cannot find matching section for [1] '.text'
This is correct, the POC files seem corrupt ELF files.
There are no sections, so the section data isn't initialized.
We should probably error out earlier using something like:
@@ -1447,7 +1447,7 @@ copy_elided_sections (Elf *unstripped, Elf *stripped,
error_exit (0, _("\
more sections in stripped file than debug file -- arguments reversed?"));
- if (unlikely (stripped_shnum == 0))
+ if (unlikely (stripped_shnum <= 1))
error_exit (0, _("no sections in stripped file"));
/* Used as sanity check for allocated section offset, if the section