On Thu, Dec 23, 2021 at 11:19:31PM +0100, Mark Wielaard wrote:
> The callers of dwfl_elf_phdr_memory_callback assume at least minread
> bytes are read and available. Make sure to check start is smaller than
> elf->maximum_size before reading more. Return false if end - start is
> smaller than minre
On Fri, Dec 24, 2021 at 01:49:54AM +0100, Mark Wielaard wrote:
> Make sure that when calling xlatetom for Phdrs and Dyns in
> dwfl_link_map_report the input buffer is correctly aligned by calling
> memcpy and setting in.d_buf to out.d_buf.
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28720
On Fri, Dec 24, 2021 at 02:06:08AM +0100, Mark Wielaard wrote:
> The gcc undefined sanitizer doesn't like the trick we use to calculate
> the (possibly) unaligned addresses to read. So calculate them by hand
> as unsigned char pointers.
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28720
Pu
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
--- Comment #7 from Mark Wielaard ---
(In reply to Evgeny Vereshchagin from comment #5)
> Created attachment 13875 [details]
> File triggering "member access within misaligned address"
Thanks. afl++ also found this (but only after 8 days...)