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

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 238 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 238 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
237 0 EP call site: 00000 opj_create_decompress

Runtime coverage analysis

Covered functions
1
Functions that are reachable but not covered
95
Reachable functions
95
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
./tests/fuzzers/opj_decompress_fuzzer_J2K.cpp 7
src/lib/openjp2/openjpeg.c 12
src/lib/openjp2/opj_malloc.c 4
src/lib/openjp2/j2k.c 9
src/lib/openjp2/function_list.c 2
src/lib/openjp2/thread.c 21
src/lib/openjp2/tcd.c 2
src/lib/openjp2/tgt.c 1
src/lib/openjp2/image.c 1
src/lib/openjp2/jp2.c 2
src/lib/openjp2/event.c 2
src/lib/openjp2/cio.c 7

Fuzzer: opj_decompress_fuzzer_JP2

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 95 39.9%
gold [1:9] 0 0.0%
yellow [10:29] 3 1.26%
greenyellow [30:49] 1 0.42%
lawngreen 50+ 139 58.4%
All colors 238 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
25 76 opj_tls_destroy call site: 00076 opj_thread_pool_destroy
11 32 opj_mutex_create call site: 00032 opj_thread_pool_setup
11 45 opj_mutex_destroy call site: 00045 opj_worker_thread_function
10 64 opj_mutex_unlock call site: 00064 opj_tls_destroy
8 173 opj_jp2_create call site: 00173 opj_j2k_create_compress
6 57 opj_mutex_lock call site: 00057 opj_cond_signal
4 20 opj_j2k_get_default_thread_count call site: 00020 opj_get_num_cpus
3 124 opj_j2k_destroy call site: 00124 opj_free
2 28 opj_tls_new call site: 00028 opj_mutex_create
2 104 opj_thread_pool_destroy call site: 00104 opj_j2k_destroy
1 4 opj_calloc call site: 00004 opj_j2k_create_decompress
1 11 opj_j2k_create_cstr_index call site: 00011 opj_free

Runtime coverage analysis

Covered functions
346
Functions that are reachable but not covered
32
Reachable functions
95
Percentage of reachable functions covered
66.32%
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
./tests/fuzzers/opj_decompress_fuzzer_JP2.cpp 7
src/lib/openjp2/openjpeg.c 12
src/lib/openjp2/opj_malloc.c 4
src/lib/openjp2/j2k.c 9
src/lib/openjp2/function_list.c 2
src/lib/openjp2/thread.c 21
src/lib/openjp2/tcd.c 2
src/lib/openjp2/tgt.c 1
src/lib/openjp2/image.c 1
src/lib/openjp2/jp2.c 2
src/lib/openjp2/event.c 2
src/lib/openjp2/cio.c 7

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
opj_jp2_decode /src/openjpeg/src/lib/openjp2/jp2.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 13 0 33 8 4 254 0 4446 4360
opj_jp2_encode /src/openjpeg/src/lib/openjp2/jp2.c 3 ['N/A', 'N/A', 'N/A'] 13 0 13 3 2 188 0 1847 1331
opj_jp2_setup_encoder /src/openjpeg/src/lib/openjp2/jp2.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 645 118 48 33 0 525 492
opj_jp2_start_compress /src/openjpeg/src/lib/openjp2/jp2.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 8 0 55 12 6 99 0 562 388
opj_jp2_read_header /src/openjpeg/src/lib/openjp2/jp2.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 7 0 146 33 16 47 0 315 176
opj_j2k_read_siz /src/openjpeg/src/lib/openjp2/j2k.c 4 ['N/A', 'N/A', 'int', 'N/A'] 3 0 700 130 55 12 0 101 65
jp2_dump /src/openjpeg/src/lib/openjp2/jp2.c 3 ['N/A', 'int', 'N/A'] 4 0 13 3 2 10 0 67 65
opj_jp2_get_tile /src/openjpeg/src/lib/openjp2/jp2.c 5 ['N/A', 'N/A', 'N/A', 'N/A', 'int'] 13 0 34 8 4 251 0 4384 47
opj_j2k_read_cod /src/openjpeg/src/lib/openjp2/j2k.c 4 ['N/A', 'N/A', 'int', 'N/A'] 3 0 230 42 17 5 0 64 44
opj_jp2_end_compress /src/openjpeg/src/lib/openjp2/jp2.c 3 ['N/A', 'N/A', 'N/A'] 7 0 37 8 4 30 0 138 43

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

Functions statically reachable by fuzzers
79.0%
517 / 652
Cyclomatic complexity statically reachable by fuzzers
90.0%
7315 / 8107

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/openjpeg/src/lib/openjp2/sparse_array.c [] []
/src/openjpeg/./tests/fuzzers/opj_decompress_fuzzer_JP2.cpp ['opj_decompress_fuzzer_JP2'] []
/src/openjpeg/src/lib/openjp2/bio.c [] []
/src/openjpeg/src/lib/openjp2/opj_includes.h [] []
/src/openjpeg/src/lib/openjp2/pi.c [] []
/src/openjpeg/src/lib/openjp2/j2k.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/dwt.c [] []
/src/openjpeg/src/lib/openjp2/t1.c [] []
/src/openjpeg/src/lib/openjp2/mct.c [] []
/src/openjpeg/src/lib/openjp2/image.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/tgt.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/./tests/fuzzers/opj_decompress_fuzzer_J2K.cpp ['opj_decompress_fuzzer_J2K'] []
/src/openjpeg/src/lib/openjp2/function_list.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/mqc_inl.h [] []
/src/openjpeg/src/lib/openjp2/invert.c [] []
/src/openjpeg/src/lib/openjp2/t2.c [] []
/src/openjpeg/src/lib/openjp2/tcd.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/cio.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/jp2.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/thread.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/ht_dec.c [] []
/src/openjpeg/src/lib/openjp2/opj_intmath.h [] []
/src/openjpeg/src/lib/openjp2/mqc.c [] []
/src/openjpeg/src/lib/openjp2/event.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/opj_malloc.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']
/src/openjpeg/src/lib/openjp2/openjpeg.c ['opj_decompress_fuzzer_J2K', 'opj_decompress_fuzzer_JP2'] ['opj_decompress_fuzzer_JP2']

Directories in report

Directory
/src/openjpeg/src/lib/openjp2/
/src/openjpeg/./tests/fuzzers/