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: test/fuzz/fuzzer_checksum.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: test/fuzz/fuzzer_example_dict.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: test/fuzz/fuzzer_minigzip.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: test/fuzz/fuzzer_compress.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: test/fuzz/fuzzer_example_flush.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: test/fuzz/fuzzer_example_large.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: test/fuzz/fuzzer_example_small.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

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
zng_tr_flush_block /src/zlib-ng/trees.c 4 ['deflate_state*', 'char*', 'uint32_t', 'int'] 7 0 41 8 9 51 0 117 110
block_state::deflate_medium /src/zlib-ng/deflate_medium.c 2 ['deflate_state*', 'int'] 4 0 75 16 25 29 0 73 65
gz_write /src/zlib-ng/gzwrite.c 3 ['gz_state*', 'void*', 'size_t'] 7 0 41 12 16 25 0 61 56
crc32_chorba_sse41 /src/zlib-ng/arch/x86/chorba_sse41.c 3 ['uint32_t', 'uint8_t*', 'size_t'] 3 0 23 6 6 39 0 57 52
adler32_avx512_vnni /src/zlib-ng/arch/x86/adler32_avx512_vnni.c 3 ['uint32_t', 'uint8_t*', 'size_t'] 5 0 53 7 9 69 0 50 48
zng_inflate_table /src/zlib-ng/inftrees.c 6 ['codetype', 'uint16_t*', 'unsigned', 'code**', 'unsigned*', 'uint16_t*'] 1 0 130 21 44 4 3 48 45
LONGEST_MATCH /src/zlib-ng/match_tpl.h 2 ['deflate_state*', 'Pos'] 3 0 120 24 42 13 0 45 42

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

Functions statically reachable by fuzzers
25.0%
135 / 547
Cyclomatic complexity statically reachable by fuzzers
35.0%
480 / 1374

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 driver synthesis

New fuzzers

The below fuzzers are templates and suggestions for how to target the set of optimal functions above

trees.c

Target file: /src/zlib-ng/trees.c
Target functions: zng_tr_flush_block
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target zng_tr_flush_block */
  UNKNOWN_TYPE unknown_0;
  char *new_var1 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_2;
  int new_var3 = ada_safe_get_int();
  zng_tr_flush_block(unknown_0, new_var1, unknown_2, new_var3);

  af_safe_gb_cleanup();
}

deflate_medium.c

Target file: /src/zlib-ng/deflate_medium.c
Target functions: block_state::deflate_medium
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target block_state::deflate_medium */
  UNKNOWN_TYPE unknown_4;
  int new_var5 = ada_safe_get_int();
  block_state::deflate_medium(unknown_4, new_var5);

  af_safe_gb_cleanup();
}

gzwrite.c

Target file: /src/zlib-ng/gzwrite.c
Target functions: gz_write
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target gz_write */
  UNKNOWN_TYPE unknown_6;
  UNKNOWN_TYPE unknown_7;
  UNKNOWN_TYPE unknown_8;
  gz_write(unknown_6, unknown_7, unknown_8);

  af_safe_gb_cleanup();
}

chorba_sse41.c

Target file: /src/zlib-ng/arch/x86/chorba_sse41.c
Target functions: crc32_chorba_sse41
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target crc32_chorba_sse41 */
  UNKNOWN_TYPE unknown_9;
  UNKNOWN_TYPE unknown_10;
  UNKNOWN_TYPE unknown_11;
  crc32_chorba_sse41(unknown_9, unknown_10, unknown_11);

  af_safe_gb_cleanup();
}

adler32_avx512_vnni.c

Target file: /src/zlib-ng/arch/x86/adler32_avx512_vnni.c
Target functions: adler32_avx512_vnni
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target adler32_avx512_vnni */
  UNKNOWN_TYPE unknown_12;
  UNKNOWN_TYPE unknown_13;
  UNKNOWN_TYPE unknown_14;
  adler32_avx512_vnni(unknown_12, unknown_13, unknown_14);

  af_safe_gb_cleanup();
}

inftrees.c

Target file: /src/zlib-ng/inftrees.c
Target functions: zng_inflate_table
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target zng_inflate_table */
  UNKNOWN_TYPE unknown_15;
  UNKNOWN_TYPE unknown_16;
  UNKNOWN_TYPE unknown_17;
  UNKNOWN_TYPE unknown_18;
  UNKNOWN_TYPE unknown_19;
  UNKNOWN_TYPE unknown_20;
  zng_inflate_table(unknown_15, unknown_16, unknown_17, unknown_18, unknown_19, unknown_20);

  af_safe_gb_cleanup();
}

match_tpl.h

Target file: /src/zlib-ng/match_tpl.h
Target functions: LONGEST_MATCH
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target LONGEST_MATCH */
  UNKNOWN_TYPE unknown_21;
  UNKNOWN_TYPE unknown_22;
  LONGEST_MATCH(unknown_21, unknown_22);

  af_safe_gb_cleanup();
}

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/zlib-ng/arch/power/power_features.c [] []
/src/zlib-ng/arch/x86/crc32_fold_vpclmulqdq_tpl.h [] []
/src/zlib-ng/tools/maketrees.c [] []
/src/zlib-ng/arch/s390/dfltcc_inflate.h [] []
/src/zlib-ng/arch/x86/adler32_avx512_p.h [] []
/src/zlib-ng/arch/x86/adler32_ssse3.c [] []
/src/zlib-ng/crc32_braid_comb_p.h [] []
/src/zlib-ng/test/test_crc32.cc [] []
/src/zlib-ng/arch/x86/chorba_sse2.c [] []
/src/zlib-ng/arch/riscv/riscv_features.c [] []
/src/zlib-ng/test/benchmarks/benchmark_compare256_rle.cc [] []
/src/zlib-ng/trees_emit.h [] []
/src/zlib-ng/arch/generic/crc32_braid_c.c [] []
/src/zlib-ng/insert_string.c [] []
/src/zlib-ng/deflate.c ['test/fuzz/fuzzer_checksum.c', 'test/fuzz/fuzzer_example_dict.c', 'test/fuzz/fuzzer_minigzip.c', 'test/fuzz/fuzzer_compress.c', 'test/fuzz/fuzzer_example_flush.c', 'test/fuzz/fuzzer_example_large.c', 'test/fuzz/fuzzer_example_small.c'] []
/src/zlib-ng/arch/generic/adler32_fold_c.c [] []
/src/zlib-ng/arch/generic/compare256_c.c [] []
/src/zlib-ng/test/test_compress_bound.cc [] []
/src/zlib-ng/test/test_compare256_rle.cc [] []
/src/zlib-ng/crc32_braid_comb.c [] []
/src/zlib-ng/arch/x86/chunkset_avx2.c [] []
/src/zlib-ng/arch/s390/s390_features.c [] []
/src/zlib-ng/arch/arm/arm_features.c [] []
/src/zlib-ng/arch/x86/adler32_avx512.c [] []
/src/zlib-ng/arch/x86/compare256_sse2.c [] []
/src/zlib-ng/deflate_quick.c [] []
/src/zlib-ng/gzwrite.c [] []
/src/zlib-ng/arch/riscv/compare256_rvv.c [] []
/src/zlib-ng/arch/riscv/crc32_zbc.c [] []
/src/zlib-ng/arch/arm/acle_intrins.h [] []
/src/zlib-ng/arch/generic/adler32_c.c [] []
/src/zlib-ng/arch/s390/dfltcc_common.h [] []
/src/zlib-ng/test/fuzz/fuzzer_example_flush.c ['test/fuzz/fuzzer_example_flush.c'] []
/src/zlib-ng/deflate_slow.c [] []
/src/zlib-ng/arch/generic/crc32_chorba_c.c [] []
/src/zlib-ng/functable.h [] []
/src/zlib-ng/test/benchmarks/benchmark_adler32.cc [] []
/src/zlib-ng/deflate.h [] []
/src/zlib-ng/test/test_large_buffers.cc [] []
/src/zlib-ng/test/benchmarks/benchmark_slidehash.cc [] []
/src/zlib-ng/test/benchmarks/benchmark_png_decode.cc [] []
/src/zlib-ng/arch/power/crc32_power8.c [] []
/src/zlib-ng/test/fuzz/fuzzer_example_dict.c ['test/fuzz/fuzzer_example_dict.c'] []
/src/zlib-ng/test/test_deflate_bound.cc [] []
/src/zlib-ng/chunkset_tpl.h [] []
/src/zlib-ng/adler32.c [] []
/src/zlib-ng/arch/riscv/adler32_rvv.c [] []
/src/zlib-ng/test/example.c ['test/fuzz/fuzzer_example_dict.c', 'test/fuzz/fuzzer_example_flush.c', 'test/fuzz/fuzzer_example_large.c', 'test/fuzz/fuzzer_example_small.c'] []
/src/zlib-ng/test/benchmarks/benchmark_compare256.cc [] []
/src/zlib-ng/crc32_braid_p.h [] []
/src/zlib-ng/insert_string_tpl.h [] []
/src/zlib-ng/zbuild.h [] []
/src/zlib-ng/arch/generic/slide_hash_c.c [] []
/src/zlib-ng/test/minigzip.c ['test/fuzz/fuzzer_example_dict.c', 'test/fuzz/fuzzer_minigzip.c', 'test/fuzz/fuzzer_example_flush.c', 'test/fuzz/fuzzer_example_large.c', 'test/fuzz/fuzzer_example_small.c'] []
/src/zlib-ng/arch/power/chunkset_power8.c [] []
/src/zlib-ng/test/test_deflate_concurrency.cc [] []
/src/zlib-ng/zmemory.h [] []
/src/zlib-ng/arch/riscv/slide_hash_rvv.c [] []
/src/zlib-ng/test/benchmarks/benchmark_compress.cc [] []
/src/zlib-ng/functable.c [] []
/src/zlib-ng/compare256_rle.h [] []
/src/zlib-ng/arch/x86/x86_features.c [] []
/src/zlib-ng/arch/generic/crc32_fold_c.c [] []
/src/zlib-ng/gzlib.c [] []
/src/zlib-ng/test/benchmarks/benchmark_png_encode.cc [] []
/src/zlib-ng/arch/x86/slide_hash_sse2.c [] []
/src/zlib-ng/test/fuzz/fuzzer_minigzip.c ['test/fuzz/fuzzer_minigzip.c'] []
/src/zlib-ng/tools/makefixed.c [] []
/src/zlib-ng/inftrees.c [] []
/src/zlib-ng/arch/arm/adler32_neon.c [] []
/src/zlib-ng/arch/x86/chorba_sse41.c [] []
/src/zlib-ng/arch/riscv/chunkset_rvv.c [] []
/src/zlib-ng/arch/s390/crc32-vx.c [] []
/src/zlib-ng/deflate_rle.c [] []
/src/zlib-ng/arch/s390/dfltcc_inflate.c [] []
/src/zlib-ng/arch/generic/compare256_p.h [] []
/src/zlib-ng/test/fuzz/fuzzer_checksum.c ['test/fuzz/fuzzer_checksum.c'] []
/src/zlib-ng/arch/power/adler32_power8.c [] []
/src/zlib-ng/inflate_p.h [] []
/src/zlib-ng/arch/arm/slide_hash_neon.c [] []
/src/zlib-ng/gzguts.h [] []
/src/zlib-ng/deflate_medium.c [] []
/src/zlib-ng/arch/x86/adler32_sse42.c [] []
/src/zlib-ng/arch/x86/compare256_avx2.c [] []
/src/zlib-ng/deflate_p.h [] []
/src/zlib-ng/match_tpl.h [] []
/src/zlib-ng/test/minideflate.c [] []
/src/zlib-ng/arch/arm/neon_intrins.h [] []
/src/zlib-ng/arch/x86/crc32_pclmulqdq_tpl.h [] []
/src/zlib-ng/arch/s390/dfltcc_detail.h [] []
/src/zlib-ng/test/fuzz/fuzzer_example_small.c ['test/fuzz/fuzzer_example_small.c'] []
/src/zlib-ng/test/switchlevels.c [] []
/src/zlib-ng/arch/generic/crc32_c.c [] []
/src/zlib-ng/arch/x86/crc32_fold_pclmulqdq_tpl.h [] []
/src/zlib-ng/arch/power/power_intrins.h [] []
/src/zlib-ng/arch/x86/adler32_ssse3_p.h [] []
/src/zlib-ng/arch/power/slide_ppc_tpl.h [] []
/src/zlib-ng/test/benchmarks/benchmark_uncompress.cc [] []
/src/zlib-ng/inffast_tpl.h [] []
/src/zlib-ng/test/fuzz/fuzzer_example_large.c ['test/fuzz/fuzzer_example_large.c'] []
/src/zlib-ng/arch/arm/compare256_neon.c [] []
/src/zlib-ng/test/infcover.c [] []
/src/zlib-ng/arch/x86/adler32_avx2_p.h [] []
/src/zlib-ng/deflate_fast.c [] []
/src/zlib-ng/test/test_compare256.cc [] []
/src/zlib-ng/zutil.h [] []
/src/zlib-ng/arch/x86/chunkset_avx512.c [] []
/src/zlib-ng/arch/x86/adler32_avx512_vnni.c [] []
/src/zlib-ng/test/test_adler32.cc [] []
/src/zlib-ng/cpu_features.c [] []
/src/zlib-ng/test/benchmarks/benchmark_adler32_copy.cc [] []
/src/zlib-ng/deflate_huff.c [] []
/src/zlib-ng/test/benchmarks/benchmark_crc32.cc [] []
/src/zlib-ng/arch/x86/slide_hash_avx2.c [] []
/src/zlib-ng/arch/x86/x86_intrins.h [] []
/src/zlib-ng/test/fuzz/fuzzer_compress.c ['test/fuzz/fuzzer_compress.c'] []
/src/zlib-ng/arch/s390/dfltcc_deflate.h [] []
/src/zlib-ng/arch/arm/chunkset_neon.c [] []
/src/zlib-ng/deflate_stored.c [] []
/src/zlib-ng/adler32_p.h [] []
/src/zlib-ng/arch/arm/slide_hash_armv6.c [] []
/src/zlib-ng/arch/arm/crc32_armv8.c [] []
/src/zlib-ng/infback.c [] []
/src/zlib-ng/tools/makecrct.c [] []
/src/zlib-ng/arch/power/compare256_power9.c [] []
/src/zlib-ng/trees.c [] []
/src/zlib-ng/arch/x86/adler32_avx2.c [] []
/src/zlib-ng/arch/power/adler32_vmx.c [] []
/src/zlib-ng/zutil.c [] []
/src/zlib-ng/arch/x86/compare256_avx512.c [] []
/src/zlib-ng/test/benchmarks/benchmark_png_shared.h [] []
/src/zlib-ng/inflate.c [] []
/src/zlib-ng/zutil_p.h [] []
/src/zlib-ng/fallback_builtins.h [] []
/src/zlib-ng/arch/s390/dfltcc_deflate.c [] []

Directories in report

Directory
/src/zlib-ng/test/benchmarks/
/src/zlib-ng/test/fuzz/
/src/zlib-ng/arch/x86/
/src/zlib-ng/test/
/src/zlib-ng/arch/arm/
/src/zlib-ng/arch/power/
/src/zlib-ng/arch/generic/
/src/zlib-ng/
/src/zlib-ng/tools/
/src/zlib-ng/arch/riscv/
/src/zlib-ng/arch/s390/