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

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 290 64.8%
gold [1:9] 9 2.01%
yellow [10:29] 17 3.80%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 131 29.3%
All colors 447 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
63 228 ZipArchive::by_index_with_optional_password call site: 00228 ZipCryptoReader::validate
40 2 fuzzed_extract call site: 00002 CentralDirectoryEnd::parse
37 89 ZipArchive::get_directory_counts call site: 00089 central_header_to_zip_file
23 419 fuzzed_extract call site: 00419 ZipArchive::new
16 163 parse_extra_field call site: 00163 CompressionMethod::from_u16
15 69 ZipArchive::get_directory_counts call site: 00069 Zip64File::seek
14 182 parse_extra_field call site: 00182
10 212 ZipArchive::by_index_with_optional_password call site: 00212 Zip64File::seek
9 131 AtomicU64::load call site: 00131 CentralDirectoryEnd::record_too_small
8 316 ZipFileData::file_name_sanitized call site: 00316
7 48 ZipArchive::get_directory_counts call site: 00048
7 142 to_char call site: 00142 System::from_u8

Runtime coverage analysis

Covered functions
732
Functions that are reachable but not covered
12
Reachable functions
38
Percentage of reachable functions covered
68.42%
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
fuzz/fuzz_targets/structured_fuzz_reader.rs 33
tests/zip64_large.rs 24
src/spec.rs 15
src/read.rs 68
src/types.rs 20
src/cp437.rs 7
src/compression.rs 1
fuzz/fuzz_targets/fuzz_read.rs 2
src/zipcrypto.rs 17
src/aes.rs 4
src/write.rs 6
tests/zip_comment_garbage.rs 5

Fuzzer: roundtrip

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 698 79.6%
gold [1:9] 0 0.0%
yellow [10:29] 4 0.45%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 174 19.8%
All colors 876 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
123 661 ZipWriter::end_extra_data call site: 00661 ZipWriter::start_file
83 479 ZipArchive::get_directory_counts call site: 00479 central_header_to_zip_file
69 198 zip::result::ZipResult::version_needed call site: 00198 CentralDirectoryEnd::write
54 312 AtomicU64::new call site: 00312 write_local_file_header
53 804 ZipArchive::by_index_with_optional_password call site: 00804 ZipCryptoReader::validate
41 418 build_zip call site: 00418 CentralDirectoryEnd::parse
36 610 ZipArchive::by_index_with_optional_password call site: 00610 ZipWriter::add_directory
23 565 parse_extra_field call site: 00565 Zip64File::seek
22 275 ZipWriter::finish_file call site: 00275 Zip64File::seek
19 178 ZipWriter::finish_file call site: 00178 ZipWriter::finalize
18 101 GenericZipWriter::switch_to call site: 00101
18 589 parse_extra_field call site: 00589

Runtime coverage analysis

Covered functions
1163
Functions that are reachable but not covered
20
Reachable functions
38
Percentage of reachable functions covered
47.37%
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
fuzz/fuzz_targets/roundtrip.rs 32
tests/zip64_large.rs 27
src/types.rs 20
src/write.rs 107
src/read.rs 60
src/zipcrypto.rs 20
src/spec.rs 18
src/cp437.rs 7
src/compression.rs 1
fuzz/fuzz_targets/fuzz_read.rs 9
tests/end_to_end.rs 28
src/aes.rs 4

Fuzzer: fuzz_zip

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 190 84.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 36 15.9%
All colors 226 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
44 181 parse_extra_field call site: 00181 ZipArchive::new
41 0 EP call site: 00000 CentralDirectoryEnd::parse
37 88 ZipArchive::get_directory_counts call site: 00088 central_header_to_zip_file
23 157 parse_extra_field call site: 00157 Zip64File::seek
15 68 ZipArchive::get_directory_counts call site: 00068 Zip64File::seek
10 141 to_char call site: 00141 System::from_u8
9 130 AtomicU64::load call site: 00130 CentralDirectoryEnd::record_too_small
7 47 ZipArchive::get_directory_counts call site: 00047
1 44 ZipArchive::get_directory_counts call site: 00044
1 55 ZipArchive::get_directory_counts call site: 00055
1 127 atomic::AtomicU64::new call site: 00127
1 153 AtomicU64::new call site: 00153 parse_extra_field

Runtime coverage analysis

Covered functions
1498
Functions that are reachable but not covered
1
Reachable functions
6
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
fuzz/fuzz_targets/fuzz_zip.rs 6
tests/zip64_large.rs 21
src/spec.rs 15
src/read.rs 37
src/types.rs 3
src/cp437.rs 7
src/compression.rs 1
tests/zip_comment_garbage.rs 5

Fuzzer: fuzz_read

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 624 78.6%
gold [1:9] 0 0.0%
yellow [10:29] 6 0.75%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 163 20.5%
All colors 793 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
80 690 ZipArchive::by_name call site: 00690 ZipWriter::raw_copy_file
69 467 zip::result::ZipResult::version_needed call site: 00467 CentralDirectoryEnd::write
63 223 ZipArchive::by_index_with_optional_password call site: 00223 ZipCryptoReader::validate
60 569 ZipWriter::finish_file call site: 00569 write_local_file_header
43 0 EP call site: 00000 CentralDirectoryEnd::parse
37 90 ZipArchive::get_directory_counts call site: 00090 central_header_to_zip_file
27 630 FileOptions::unix_permissions call site: 00630 ZipWriter::start_file
23 159 parse_extra_field call site: 00159 Zip64File::seek
22 544 ZipWriter::finish_file call site: 00544 Zip64File::seek
21 297 ZipArchive::by_index call site: 00297 ZipWriter::add_directory
19 447 ZipWriter::finish_file call site: 00447 ZipWriter::finalize
19 773 zip::result::ZipResult::by_name call site: 00773 ZipWriter::raw_copy_file_rename

Runtime coverage analysis

Covered functions
1498
Functions that are reachable but not covered
5
Reachable functions
10
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.
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
fuzz/fuzz_targets/fuzz_read.rs 10
tests/zip64_large.rs 27
src/spec.rs 18
src/read.rs 60
src/types.rs 20
src/cp437.rs 7
src/compression.rs 1
src/zipcrypto.rs 20
src/aes.rs 4
tests/end_to_end.rs 28
src/write.rs 102

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.

fuzz/fuzz_targets/structured_fuzz_reader.rs

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=['ZipArchive::by_index_with_optional_password', 'fuzzed_extract', 'ZipArchive::get_directory_counts', 'parse_extra_field', 'AtomicU64::load', 'ZipFileData::file_name_sanitized']

fuzz/fuzz_targets/roundtrip.rs

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=['ZipWriter::end_extra_data', 'ZipArchive::get_directory_counts', 'zip::result::ZipResult::version_needed', 'AtomicU64::new', 'ZipArchive::by_index_with_optional_password', 'build_zip', 'parse_extra_field', 'ZipWriter::finish_file']

fuzz/fuzz_targets/fuzz_zip.rs

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=['parse_extra_field', 'ZipArchive::get_directory_counts', 'to_char', 'AtomicU64::load']

fuzz/fuzz_targets/fuzz_read.rs

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=['ZipArchive::by_name', 'zip::result::ZipResult::version_needed', 'ZipArchive::by_index_with_optional_password', 'ZipWriter::finish_file', 'ZipArchive::get_directory_counts', 'FileOptions::unix_permissions', 'parse_extra_field', 'ZipArchive::by_index']

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/zip/src/read/stream.rs [] []
/src/zip/benches/read_entry.rs [] []
/src/zip/examples/write_dir.rs [] []
/src/zip/src/types.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read']
/src/zip/fuzz/fuzz_targets/fuzz_zip.rs ['fuzz_zip'] []
/src/zip/src/crc32.rs [] []
/src/zip/src/aes.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_read']
/src/zip/tests/issue_234.rs [] []
/src/zip/src/zipcrypto.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_read']
/src/zip/tests/zip_crypto.rs [] []
/src/zip/src/result.rs [] []
/src/zip/src/write.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_read']
/src/zip/src/compression.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read']
/src/zip/fuzz/fuzz_targets/roundtrip.rs ['roundtrip'] ['roundtrip']
/src/zip/tests/aes_encryption.rs [] []
/src/zip/src/cp437.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read']
/src/zip/benches/read_metadata.rs [] []
/src/zip/src/read.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read']
/src/zip/tests/invalid_date.rs [] []
/src/zip/tests/zip_comment_garbage.rs ['structured_fuzz_reader', 'fuzz_zip'] []
/src/zip/tests/end_to_end.rs ['roundtrip', 'fuzz_read'] []
/src/zip/fuzz/fuzz_targets/structured_fuzz_reader.rs ['structured_fuzz_reader'] ['structured_fuzz_reader']
/src/zip/tests/zip64_large.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read']
/src/zip/src/aes_ctr.rs [] []
/src/zip/fuzz/fuzz_targets/fuzz_read.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_read'] []
/src/zip/src/spec.rs ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read'] ['structured_fuzz_reader', 'roundtrip', 'fuzz_zip', 'fuzz_read']

Directories in report

Directory
/src/zip/src/read/
/src/zip/tests/
/src/zip/src/
/src/zip/examples/
/src/zip/benches/
/src/zip/fuzz/fuzz_targets/