From: Mark Wielaard <mark@klomp.org>
To: Evgeny Vereshchagin <evvers@ya.ru>, elfutils-devel@sourceware.org
Cc: "evv… via monorail" <monorail+v2.2672886254@chromium.org>
Subject: Re: Issue 62071 in oss-fuzz: elfutils:fuzz-libdwfl: Null-dereference READ in chunk_compare
Date: Thu, 07 Sep 2023 14:36:13 +0200 [thread overview]
Message-ID: <e93b13396aa82a73bb247f7b888f7c4568b9d69c.camel@klomp.org> (raw)
In-Reply-To: <000000000000e1a42b0604c408ca@google.com>
Hi Evgeny,
On Thu, 2023-09-07 at 05:31 -0700, evv… via monorail via Elfutils-devel
wrote:
> Comment #1 on issue 62071 by evv...@gmail.com: elfutils:fuzz-libdwfl: Null-dereference READ in chunk_compare
> https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62071#c1
>
> ```
> SCARINESS: 10 (null-deref)
> #0 0x82d35d1 in chunk_compare /src/elfutils/libelf/elf_getdata_rawchunk.c:49:25
> #1 0xf7caab3a in __tsearch
> #2 0x8156826 in __interceptor_tsearch /src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:6057:15
> #3 0x82d2a8a in elf_getdata_rawchunk /src/elfutils/libelf/elf_getdata_rawchunk.c:98:28
> #4 0x81f4139 in find_elf_build_id /src/elfutils/libdwelf/dwelf_elf_gnu_build_id.c:88:28
> #5 0x81f3a28 in __libdwfl_find_elf_build_id /src/elfutils/libdwelf/dwelf_elf_gnu_build_id.c:142:10
> #6 0x82795e8 in __libdwfl_find_build_id /src/elfutils/libdwfl/dwfl_module_build_id.c:70:16
> #7 0x82795e8 in dwfl_module_build_id /src/elfutils/libdwfl/dwfl_module_build_id.c:91:20
> #8 0x81d7ec7 in dwfl_standard_find_debuginfo /src/elfutils/libdwfl/find-debuginfo.c:365:19
> #9 0x81d3340 in find_debuginfo /src/elfutils/libdwfl/dwfl_module_getdwarf.c:538:19
> #10 0x81cff0f in find_dw /src/elfutils/libdwfl/dwfl_module_getdwarf.c:1412:16
> #11 0x81cff0f in dwfl_module_getdwarf /src/elfutils/libdwfl/dwfl_module_getdwarf.c:1446:3
> #12 0x81cad03 in LLVMFuzzerTestOneInput /src/fuzz-libdwfl.c:54:3
> #13 0x808ba2e in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned int) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
> #14 0x808b168 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned int, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
> #15 0x808cfdd in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:826:7
> #16 0x808d1de in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:857:3
> #17 0x807c3fc in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned int)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
> #18 0x80a6177 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
> #19 0xf7bc5ed4 in __libc_start_main
> #20 0x806dad5 in _start
> ```
> The fuzz target can be found at https://github.com/google/oss-fuzz/blob/master/projects/elfutils/fuzz-libdwfl.c
Thanks. But this doesn't really get me much further. Somehow a NULL key
got into the search tree and I am still unclear how that can happen.
If there is a reproducer/input file that would be really helpful.
Cheers,
Mark
next prev parent reply other threads:[~2023-09-07 12:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0=71cc74a7ba1af446b7ed6b9a08b414d9=1491f90a54bd791097d19cec88a861b0=oss-fuzz@monorail-prod.appspotmail.com>
2023-09-06 5:01 ` ClusterFuzz-External via monorail
2023-09-07 9:38 ` Mark Wielaard
2023-09-07 12:31 ` evv… via monorail
2023-09-07 12:36 ` Mark Wielaard [this message]
2023-09-07 13:23 ` evv… via monorail
2023-09-07 14:25 ` Mark Wielaard
2023-09-11 7:42 ` Mark Wielaard
2023-09-20 7:52 ` ClusterFuzz-External via monorail
2023-09-20 7:52 ` ClusterFuzz-External via monorail
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e93b13396aa82a73bb247f7b888f7c4568b9d69c.camel@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
--cc=evvers@ya.ru \
--cc=monorail+v2.2672886254@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).