[PATCH] libdw: Simplify __libdw_getabbrev and fix dwarf_offabbrev issue

2025-02-10 Thread Mark Wielaard
__libdw_getabbrev could crash on reading a bad abbrev by trying to deallocate memory it didn't allocate itself. This could happen because dwarf_offabbrev would supply its own memory when calling __libdw_getabbrev. No other caller did this. Simplify the __libdw_getabbrev common code by not taking e

[Bug tools/32673] New: eu-strip SEGV (illegal read access) in gelf_getsymshndx (libelf/gelf_getsymshndx.c:123)

2025-02-10 Thread swj22 at mails dot tsinghua.edu.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=32673 Bug ID: 32673 Summary: eu-strip SEGV (illegal read access) in gelf_getsymshndx (libelf/gelf_getsymshndx.c:123) Product: elfutils Version: unspecified Status: UNCONFIR

[Bug tools/32672] New: eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

2025-02-10 Thread swj22 at mails dot tsinghua.edu.cn
https://sourceware.org/bugzilla/show_bug.cgi?id=32672 Bug ID: 32672 Summary: eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60) Product: elfutils Version: unspecified Status: UNCONFIRMED

[Bug tools/32672] eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

2025-02-10 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32672 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1

[PATCH] libelf, readelf: Use validate_str also to check dynamic symstr data

2025-02-10 Thread Mark Wielaard
When dynsym/str was read through eu-readelf --dynamic by readelf process_symtab the string data was not validated, possibly printing unallocated memory past the end of the symstr data. Fix this by truning the elf_strptr validate_str function into a generic lib/system.h helper function and use it in

[Bug general/32598] Use --track-fds=yes when running tests under valgrind

2025-02-10 Thread amerey at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32598 Aaron Merey changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[PATCH] readelf: Handle NULL phdr in handle_dynamic_symtab

2025-02-10 Thread Mark Wielaard
A corrupt ELF file can have broken program headers, in which case gelf_getphdr returns NULL. This could crash handle_dynamic_symtab while searching for the PT_DYNAMIC phdr. Fix this by checking whether gelf_phdr returns NULL. * src/readelf.c (handle_dynamic_symtab): Check whether

[PATCH] readelf: Skip trying to uncompress sections without a name

2025-02-10 Thread Mark Wielaard
When combining eu-readelf -z with -x or -p to dump the data or strings in an (corrupted ELF) unnamed numbered section eu-readelf could crash trying to check whether the section name starts with .zdebug. Fix this by skipping sections without a name. * src/readelf.c (dump_data_section): Don't try

[Bug tools/32672] eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

2025-02-10 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32672 Mark Wielaard changed: What|Removed |Added Assignee|unassigned at sourceware dot org |mark at klomp dot org Last r