https://sourceware.org/bugzilla/show_bug.cgi?id=28720
--- Comment #17 from Evgeny Vereshchagin ---
FWIW I tested
https://sourceware.org/pipermail/elfutils-devel/2022q1/004637.html as well with
gcc (since it isn't reproducible with clang), honggfuzz and the latest OSS-Fuzz
corpus. That issue is go
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
--- Comment #16 from Evgeny Vereshchagin ---
I tested both patches with CFLite, AFL++ and hongfuzz for about ten minutes
under ASan/UBSan with the reproducer testcases included in the "seed" corpus. I
also unleashed the latest corpus provided
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
--- Comment #15 from Mark Wielaard ---
(In reply to Evgeny Vereshchagin from comment #3)
> $ UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
> LD_LIBRARY_PATH="./libdw;./libelf" ./src/stack --core
> SIGABRT.PC.7fffe4f4e84c.STA
The gcc undefined sanitizer complains when seeing a zero sized array
declaration. Move the declaration to the point in the code where we
know they aren't zero sized.
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
Signed-off-by: Mark Wielaard
---
libdwfl/ChangeLog | 5 +
libdwfl/link
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
--- Comment #14 from Mark Wielaard ---
(In reply to Evgeny Vereshchagin from comment #3)
> $ UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
> LD_LIBRARY_PATH="./libdw;./libelf" ./src/stack --core
> SIGABRT.PC.7fffe4f4e84c.STA
The xlate functions only handle correctly aligned buffers. But they do
handle src == dest. So if the source buffer isn't aligned correctly
just copy it first into the destination (which is already correctly
aligned).
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
Signed-off-by: Mark Wielaa
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
--- Comment #13 from Mark Wielaard ---
(In reply to Evgeny Vereshchagin from comment #9)
> According to OSS-Fuzz looks like that commit triggered
> https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43307 (which was also
> reported in
> htt
The buffer_available overflow check wasn't complete. Also check nb
isn't too big.
https://sourceware.org/bugzilla/show_bug.cgi?id=28720
Signed-off-by: Mark Wielaard
---
libdwfl/ChangeLog | 4
libdwfl/link_map.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/libdwfl