Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Fuzzer details

Fuzzer: dr_flac_fuzzer

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 251 100.%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 0 0.0%
All colors 251 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
250 0 EP call site: 00000 drflac_open_memory

Runtime coverage analysis

Covered functions
0
Functions that are reachable but not covered
89
Reachable functions
89
Percentage of reachable functions covered
0.0%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
flac/dr_flac_fuzzer.cc 1
flac/../../dr_flac.h 45

Fuzzer: dr_mp3_fuzzer

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 32 17.8%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 147 82.1%
All colors 179 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
17 132 drmp3_decode_next_frame_ex__memory(drmp3*, short*, drmp3dec_frame_info*, unsigned char const**) call site: 00132 drmp3dec_decode_frame
11 7 drmp3_init_internal(drmp3*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drmp3_seek_origin), unsigned int (*)(void*, long long*), void (*)(void*, drmp3_metadata const*), void*, void*, drmp3_allocation_callbacks const*) call site: 00007 drmp3_malloc
1 115 drmp3dec_decode_frame call site: 00115
1 154 drmp3_init_internal(drmp3*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drmp3_seek_origin), unsigned int (*)(void*, long long*), void (*)(void*, drmp3_metadata const*), void*, void*, drmp3_allocation_callbacks const*) call site: 00154
1 162 drmp3__on_seek_memory(void*, int, drmp3_seek_origin) call site: 00162 __assert_fail
1 176 LLVMFuzzerTestOneInput call site: 00176 fclose

Runtime coverage analysis

Covered functions
63
Functions that are reachable but not covered
20
Reachable functions
139
Percentage of reachable functions covered
85.61%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
mp3/dr_mp3_fuzzer.cc 1
mp3/../../dr_mp3.h 72

Fuzzer: dr_wav_fuzzer

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 234 63.0%
gold [1:9] 1 0.26%
yellow [10:29] 1 0.26%
greenyellow [30:49] 2 0.53%
lawngreen 50+ 133 35.8%
All colors 371 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
199 73 drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int) call site: 00073 drwav_fourcc_equal
8 274 drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int) call site: 00274 drwav_free
7 361 LLVMFuzzerTestOneInput call site: 00361 __assert_fail
2 36 drwav__read_chunk_header(unsigned long (*)(void*, void*, unsigned long), void*, drwav_container, unsigned long long*, drwav_chunk_header*) call site: 00036 drwav_bytes_to_u64
1 9 drwav__on_seek_memory(void*, int, drwav_seek_origin) call site: 00009 __assert_fail
1 46 drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int) call site: 00046
1 52 drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int) call site: 00052
1 56 drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int) call site: 00056
1 71 drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int) call site: 00071
1 283 drwav_free call site: 00283
1 285 drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int) call site: 00285 drwav_free
1 295 LLVMFuzzerTestOneInput call site: 00295 drwav_read_pcm_frames

Runtime coverage analysis

Covered functions
68
Functions that are reachable but not covered
66
Reachable functions
132
Percentage of reachable functions covered
50.0%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
wav/dr_wav_fuzzer.cc 1
wav/../../dr_wav.h 76

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
drwav_open_file_and_read_pcm_frames_s32_w /src/dr_libs/tests/wav/../../dr_wav.h 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 10 0 83 15 6 169 0 1042 291
drflac_seek_to_pcm_frame /src/dr_libs/tests/flac/../../dr_flac.h 2 ['N/A', 'size_t'] 14 0 325 49 20 92 1 772 266
drflac_open_file_and_read_pcm_frames_f32 /src/dr_libs/tests/flac/../../dr_flac.h 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 12 0 85 15 6 101 0 962 219
drmp3_open_file_and_read_pcm_frames_s16 /src/dr_libs/tests/mp3/../../dr_mp3.h 4 ['N/A', 'N/A', 'N/A', 'N/A'] 12 0 41 6 3 147 0 649 175
drwav_init_memory_write_sequential_pcm_frames /src/dr_libs/tests/wav/../../dr_wav.h 6 ['N/A', 'N/A', 'N/A', 'N/A', 'size_t', 'N/A'] 8 0 50 6 3 44 0 146 137
drwav_open_file_and_read_pcm_frames_f32 /src/dr_libs/tests/wav/../../dr_wav.h 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 10 0 83 15 6 168 0 1036 123
drmp3_calculate_seek_points /src/dr_libs/tests/mp3/../../dr_mp3.h 3 ['N/A', 'N/A', 'N/A'] 14 0 391 52 18 130 0 429 75
drwav_write_pcm_frames /src/dr_libs/tests/wav/../../dr_wav.h 3 ['N/A', 'size_t', 'N/A'] 9 0 39 6 3 56 0 157 60
drflac_open_memory_and_read_pcm_frames_s16 /src/dr_libs/tests/flac/../../dr_flac.h 6 ['N/A', 'size_t', 'N/A', 'N/A', 'N/A', 'N/A'] 12 0 88 15 6 92 0 813 55

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
77.0%
324 / 421
Cyclomatic complexity statically reachable by fuzzers
89.0%
3411 / 3837

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

flac/dr_flac_fuzzer.cc

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


mp3/dr_mp3_fuzzer.cc

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['drmp3_decode_next_frame_ex__memory(drmp3*, short*, drmp3dec_frame_info*, unsigned char const**)', 'drmp3_init_internal(drmp3*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drmp3_seek_origin), unsigned int (*)(void*, long long*), void (*)(void*, drmp3_metadata const*), void*, void*, drmp3_allocation_callbacks const*)', 'drmp3dec_decode_frame', 'drmp3_init_internal(drmp3*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drmp3_seek_origin), unsigned int (*)(void*, long long*), void (*)(void*, drmp3_metadata const*), void*, void*, drmp3_allocation_callbacks const*)', 'drmp3__on_seek_memory(void*, int, drmp3_seek_origin)', 'LLVMFuzzerTestOneInput']

wav/dr_wav_fuzzer.cc

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int)', 'drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int)', 'LLVMFuzzerTestOneInput', 'drwav__read_chunk_header(unsigned long (*)(void*, void*, unsigned long), void*, drwav_container, unsigned long long*, drwav_chunk_header*)', 'drwav__on_seek_memory(void*, int, drwav_seek_origin)', 'drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int)', 'drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int)', 'drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int)', 'drwav_init__internal(drwav*, unsigned long long (*)(void*, unsigned long (*)(void*, void*, unsigned long), unsigned int (*)(void*, int, drwav_seek_origin), void*, drwav_chunk_header const*, drwav_container, drwav_fmt const*), void*, unsigned int)', 'drwav_free']