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: fuzz_entry

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 80 65.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 42 34.4%
All colors 122 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
371 371 5 :

['strlen', 'mz_zip_writer_create_zip64_extra_data', 'mz_zip_time_t_to_dos_time', 'mz_zip_writer_add_to_central_dir', 'tdefl_compress_buffer']

371 371 zip_entry_close call site: 00044 /src/zip/src/zip.c:1371
31 31 1 :

['mz_zip_writer_finalize_archive']

62 79 zip_close call site: 00112 /src/zip/src/zip.c:1040
31 31 2 :

['zip_archive_truncate', 'mz_zip_writer_end']

31 48 zip_close call site: 00113 /src/zip/src/zip.c:1044
2 2 1 :

['fclose']

2 2 mz_zip_reader_end_internal call site: 00015 /src/zip/src/miniz.h:6035
0 0 None 47 256 zip_stream_openwitherror call site: 00003 /src/zip/src/zip.c:1916
0 0 None 47 256 zip_stream_openwitherror call site: 00003 /src/zip/src/zip.c:1922
0 0 None 2 2 mz_zip_reader_end_internal call site: 00015 /src/zip/src/miniz.h:6015
0 0 None 0 318 zip_entry_read call site: 00033 /src/zip/src/zip.c:1612
0 0 None 0 300 mz_zip_reader_extract_to_heap call site: 00036 /src/zip/src/miniz.h:6815
0 0 None 0 248 mz_zip_reader_extract_to_mem_no_alloc1 call site: 00037 /src/zip/src/miniz.h:6626
0 0 None 0 201 mz_zip_reader_init_mem call site: 00004 /src/zip/src/miniz.h:6088
0 0 None 0 190 mz_zip_reader_init_mem call site: 00005 /src/zip/src/miniz.h:6094

Runtime coverage analysis

Covered functions
38
Functions that are reachable but not covered
34
Reachable functions
63
Percentage of reachable functions covered
46.03%
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
/src/zip/fuzz/fuzz_entry.c 1
zip.c 9
miniz.h 44

Fuzzer: fuzz_stream

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 25 16.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 128 83.6%
All colors 153 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
8 8 1 :

['mz_zip_reader_eocd64_valid']

8 77 mz_zip_reader_read_central_dir call site: 00007 /src/zip/src/miniz.h:5725
8 8 2 :

['memcmp', 'strlen']

8 8 mz_zip_reader_locate_file_v2 call site: 00028 /src/zip/src/miniz.h:6552
5 5 1 :

['mz_adler32']

5 197 tdefl_compress call site: 00061 /src/zip/src/miniz.h:3855
4 4 2 :

['fileno', 'ftruncate']

4 4 zip_archive_truncate call site: 00129 /src/zip/src/zip.c:303
2 2 1 :

['fclose']

2 2 mz_zip_reader_end_internal call site: 00015 /src/zip/src/miniz.h:6035
2 2 1 :

['fclose']

2 2 mz_zip_writer_end_internal call site: 00020 /src/zip/src/miniz.h:7927
0 19 1 :

['mz_zip_writer_end_internal']

0 19 mz_zip_writer_init_heap_v2 call site: 00019 /src/zip/src/miniz.h:8025
0 0 None 8 77 mz_zip_reader_read_central_dir call site: 00007 /src/zip/src/miniz.h:5695
0 0 None 8 77 mz_zip_reader_read_central_dir call site: 00007 /src/zip/src/miniz.h:5718
0 0 None 8 27 mz_zip_reader_locate_file_v2 call site: 00028 /src/zip/src/miniz.h:6548
0 0 None 5 466 tdefl_compress call site: 00059 /src/zip/src/miniz.h:3807
0 0 None 5 466 tdefl_compress call site: 00059 /src/zip/src/miniz.h:3824

Runtime coverage analysis

Covered functions
82
Functions that are reachable but not covered
13
Reachable functions
78
Percentage of reachable functions covered
83.33%
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.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/zip/fuzz/fuzz_stream.c 1
zip.c 13
miniz.h 53

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
mz_zip_add_mem_to_archive_file_in_place /src/zip/src/miniz.h 7 ['N/A', 'N/A', 'N/A', 'size_t', 'N/A', 'short', 'int'] 10 0 40 3 2 56 0 866 205
mz_zip_writer_add_from_zip_reader /src/zip/src/miniz.h 3 ['N/A', 'N/A', 'int'] 3 0 3960 371 136 11 0 251 172
mz_zip_validate_mem_archive /src/zip/src/miniz.h 4 ['N/A', 'size_t', 'int', 'N/A'] 7 0 148 29 11 29 0 692 171
zip_create /src/zip/src/zip.c 3 ['N/A', 'N/A', 'size_t'] 10 0 309 50 19 49 0 650 160
zip_entries_delete /src/zip/src/zip.c 3 ['N/A', 'N/A', 'size_t'] 10 0 168 33 12 51 0 601 125
zip_extract /src/zip/src/zip.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 5 0 70 13 6 44 0 683 95
zip_entry_noallocreadwithoffset /src/zip/src/zip.c 4 ['N/A', 'size_t', 'size_t', 'N/A'] 5 0 278 42 14 14 0 328 83
mz_uncompress /src/zip/src/miniz.h 4 ['N/A', 'N/A', 'N/A', 'size_t'] 4 0 27 3 2 8 0 231 55
mz_compress /src/zip/src/miniz.h 4 ['N/A', 'N/A', 'N/A', 'size_t'] 8 0 28 3 2 22 0 362 46

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

Functions statically reachable by fuzzers
60.0%
134 / 222
Cyclomatic complexity statically reachable by fuzzers
84.0%
2242 / 2669

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