Bug ID: 22886
           Summary: Timeout at cplus-dem.c (73658672)
           Product: binutils
           Version: 2.31 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: security-tps at google dot com
  Target Milestone: ---

Created attachment 10848
Dockerfile and poc

Hello binutils team,

As part of our fuzzing efforts at Google, we have identified an issue affecting
binutils (tested with revision * master

To reproduce, we are attaching a Dockerfile which compiles the project with
LLVM, taking advantage of the sanitizers that it offers. More information about
how to use the attached Dockerfile can be found here:

TL;DR instructions:
* `mkdir project`
* `cp Dockerfile.binutils /path/to/project/Dockerfile`
* `docker build --no-cache /path/to/project`
* `docker run --cap-add=SYS_PTRACE -it image_id_from_docker_build`

>From another terminal, outside the container:
`docker cp /path/to/attached/reproducer

And, back inside the container:
`/fuzzing/ /fuzzing/reproducer`

Alternatively, and depending on the bug, you could use gcc, valgrind or other
instrumentation tools to aid in the investigation. The sanitizer error that we
encountered is here:

INFO: Seed: 151352331
/fuzzing/binutils-gdb/build/demangle_fuzzer: Running 1 inputs 1 time(s) each.
Running: /tmp/poc
ALARM: working on the last Unit for 25 seconds
       and the timeout value is 25 (use -timeout=N to change)
==11== ERROR: libFuzzer: timeout after 25 seconds
    #0 0x4da793 in __sanitizer_print_stack_trace
    #1 0x535e67 in fuzzer::Fuzzer::AlarmCallback()
    #2 0x7f2984ebe0bf  (/lib/x86_64-linux-gnu/
    #3 0x4edb08 in __sanitizer::StackDepotPut(__sanitizer::StackTrace)
    #4 0x424392 in __asan::asan_malloc(unsigned long,
    #5 0x4cd464 in __interceptor_malloc
    #6 0x530a29 in xmalloc /fuzzing/binutils-gdb/libiberty/xmalloc.c:147:12
    #7 0x51175b in string_need
    #8 0x5111ee in string_appends
    #9 0x518327 in do_arg /fuzzing/binutils-gdb/libiberty/cplus-dem.c:4295:7
    #10 0x51767d in demangle_args
    #11 0x50e229 in demangle_signature
    #12 0x50bc20 in internal_cplus_demangle
    #13 0x50a98c in cplus_demangle
    #14 0x50847d in LLVMFuzzerTestOneInput
    #15 0x53779c in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*,
unsigned long) (/fuzzing/binutils-gdb/build/demangle_fuzzer+0x53779c)
    #16 0x536f5e in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long)
    #17 0x530dbd in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*)
    #18 0x53228f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char
const*, unsigned long)) (/fuzzing/binutils-gdb/build/demangle_fuzzer+0x53228f)
    #19 0x530c6c in main (/fuzzing/binutils-gdb/build/demangle_fuzzer+0x530c6c)
    #20 0x7f298450b2b0 in __libc_start_main
    #21 0x41db69 in _start

SUMMARY: libFuzzer: timeout


We will gladly work with you so you can successfully confirm and reproduce this
issue. Do let us know if you have any feedback surrounding the documentation.

Once you have reproduced the issue, we'd appreciate to learn your expected
timeline for an update to be released. With any fix, please attribute the
to "Google Autofuzz project".

We are also pleased to inform you that your project is eligible for inclusion
the OSS-Fuzz project, which can provide additional continuous fuzzing, and
encourage you to investigate integration options.

Don't hesitate to let us know if you have any questions!

Google AutoFuzz Team

You are receiving this mail because:
You are on the CC list for the bug.
bug-binutils mailing list

Reply via email to