[Bug libelf/33099] heap overflow in print_dwarf_addr

2025-06-23 Thread ZeroTrac3r at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=33099 --- Comment #5 from Zero Trac3r --- (In reply to Mark Wielaard from comment #4) > (In reply to Mark Wielaard from comment #3) > > Or maybe we need to add the check where the symstrdata is allocated? > > I wrote a patch to do that instead: >

Re: [PATCH] libdwl: Add validate_strdata to limit Elf_Data d_size to valid strings.

2025-06-23 Thread Aaron Merey
Hi Mark, On Sun, Jun 22, 2025 at 10:19 AM Mark Wielaard wrote: > > dwfl_module_getsym returns the name of a symbol as found in the > corresponding (symbol) string section. Make sure all names are > correctly zero terminated by making sure the last valid index in a > section/segment Elf_Data conta

[PATCH 2/6 v2] doc: Add elf_getaroff.3

2025-06-23 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2: Clarify that the offset refers to the archive member header. > > +.SH RETURN VALUE > > +Return the file offset, in bytes, of the archive member referred to by > > +.IR elf . > > +If > > +.I elf > > +is NULL or is not a member of an archive, > > +return > > +.BR

[PATCH 3/6 v2] doc: Add elf_getarhdr.3

2025-06-23 Thread Aaron Merey
Signed-off-by: Aaron Merey --- v2 changes: clarify when changes to the parent archive descriptor invalidate the return value. Change thread safety attribute to MT-Unsafe race. doc/Makefile.am| 1 + doc/elf_getarhdr.3 | 80 ++ 2 files changed, 81