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: zip_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 294 61.2%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 186 38.7%
All colors 480 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
84 36 mz_stream_tell call site: 00036 mz_zip_recover_cd
72 125 mz_stream_write call site: 00125 mz_zip_entry_write_header
34 252 mz_zip_entry_write_header call site: 00252 mz_zip_extrafield_write
15 324 mz_zip_entry_write_close call site: 00324 mz_zip_entry_seek_local_header
15 361 mz_zip_write_cd call site: 00361 mz_stream_write_uint32
14 287 mz_zip_entry_write_header call site: 00287 mz_zip_close
11 430 mz_zip_entry_write_open call site: 00430 mz_stream_wzaes_create
9 342 mz_zip_entry_close_int call site: 00342 mz_zip_entry_read_close
7 201 mz_zip_attrib_convert call site: 00201 mz_stream_read_uint16
6 456 mz_zip_entry_open_int call site: 00456 mz_stream_set_prop_int64
3 30 mz_zip_open call site: 00030 mz_zip_read_cd
2 21 mz_stream_mem_open call site: 00021 mz_stream_mem_delete

Runtime coverage analysis

Covered functions
138
Functions that are reachable but not covered
44
Reachable functions
110
Percentage of reachable functions covered
60.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.
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
test/fuzz/zip_fuzzer.c 1
mz_strm_mem.c 12
mz_strm.c 29
mz_zip.c 47
mz_strm_wzaes.c 3
mz_crypt_openssl.c 4
mz_strm_pkcrypt.c 3
mz_strm_zlib.c 1
mz_strm_ppmd.c 1
mz_crypt.c 1

Fuzzer: unzip_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 100 21.5%
gold [1:9] 0 0.0%
yellow [10:29] 1 0.21%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 363 78.2%
All colors 464 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
38 336 mz_zip_entry_read_close call site: 00336 mz_zip_write_cd
18 294 mz_stream_close call site: 00294 mz_zip_entry_write_header
10 315 mz_zip_entry_seek_local_header call site: 00315 mz_zip_entry_write_crc_sizes
6 279 mz_zip_recover_cd call site: 00279 mz_stream_seek
4 331 mz_zip_entry_read_close call site: 00331 mz_zip_extrafield_contains
3 290 mz_zip_entry_close_raw call site: 00290 mz_zip_entry_write_close
2 66 mz_zip_recover_cd call site: 00066 mz_stream_seek
2 237 mz_zip_entry_write_header call site: 00237 mz_stream_write_int64
2 287 mz_zip_close call site: 00287 mz_zip_entry_close
2 430 mz_zip_entry_open_int call site: 00430 mz_stream_set_prop_int64
1 8 mz_zip_open call site: 00008 mz_stream_mem_open
1 183 mz_zip_entry_write_header call site: 00183 mz_zip_attrib_is_dir

Runtime coverage analysis

Covered functions
196
Functions that are reachable but not covered
13
Reachable functions
122
Percentage of reachable functions covered
89.34%
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
test/fuzz/unzip_fuzzer.c 1
mz_strm_mem.c 10
mz_zip.c 59
mz_strm.c 29
mz_strm_wzaes.c 3
mz_crypt_openssl.c 4
mz_strm_pkcrypt.c 3
mz_strm_zlib.c 1
mz_strm_ppmd.c 1
mz_os_posix.c 1
mz_crypt.c 1

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_stream_ppmd_close /src/minizip-ng/mz_strm_ppmd.c 1 ['N/A'] 7 0 49 6 3 33 0 250 238
mz_stream_wzaes_open /src/minizip-ng/mz_strm_wzaes.c 3 ['N/A', 'N/A', 'int'] 5 0 352 40 17 46 0 183 148
mz_dir_has_unsafe_symlink /src/minizip-ng/mz_os.c 2 ['N/A', 'N/A'] 2 0 454 78 30 12 0 86 80
mz_stream_ppmd_read /src/minizip-ng/mz_strm_ppmd.c 3 ['N/A', 'N/A', 'int'] 7 0 198 32 12 27 0 236 51
mz_file_get_crc /src/minizip-ng/mz_os.c 2 ['N/A', 'N/A'] 3 0 104 19 7 17 0 56 50

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

Functions statically reachable by fuzzers
55.0%
176 / 322
Cyclomatic complexity statically reachable by fuzzers
69.0%
1462 / 2113

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

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
/src/minizip-ng/mz_strm.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']
[] []
/src/minizip-ng/mz_crypt.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']
/src/minizip-ng/third_party/ppmd/C/Ppmd8Dec.c [] []
/src/minizip-ng/mz_os_posix.c ['unzip_fuzzer'] ['unzip_fuzzer']
/src/minizip-ng/mz_strm_zlib.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']
/src/minizip-ng/mz_strm_ppmd.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']
/src/minizip-ng/mz_crypt_openssl.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']
/src/minizip-ng/mz_strm_wzaes.c ['zip_fuzzer', 'unzip_fuzzer'] ['unzip_fuzzer']
/src/minizip-ng/test/fuzz/zip_fuzzer.c ['zip_fuzzer'] ['zip_fuzzer']
/src/minizip-ng/third_party/ppmd/C/Ppmd8.c [] []
/src/minizip-ng/third_party/ppmd/C/Ppmd8Enc.c [] []
/src/minizip-ng/test/fuzz/unzip_fuzzer.c ['unzip_fuzzer'] ['unzip_fuzzer']
/src/minizip-ng/mz_zip.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']
/src/minizip-ng/mz_strm_pkcrypt.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']
/src/minizip-ng/mz_strm_os_posix.c [] []
/src/minizip-ng/mz_os.c [] []
/src/minizip-ng/mz_strm_mem.c ['zip_fuzzer', 'unzip_fuzzer'] ['zip_fuzzer', 'unzip_fuzzer']

Directories in report

Directory
/src/minizip-ng/test/fuzz/
/src/minizip-ng/
/src/minizip-ng/third_party/ppmd/C/