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: libpng_read_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 388 56.5%
gold [1:9] 10 1.45%
yellow [10:29] 12 1.74%
greenyellow [30:49] 8 1.16%
lawngreen 50+ 268 39.0%
All colors 686 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
105 225 3 :

['OSS_FUZZ_png_destroy_read_struct', 'OSS_FUZZ_png_image_error', 'OSS_FUZZ_png_destroy_info_struct']

105 225 png_image_read_init call site: 00471 /src/libpng/pngread.c:1150
105 105 1 :

['OSS_FUZZ_png_image_error']

105 105 OSS_FUZZ_png_image_begin_read_from_memory call site: 00459 /src/libpng/pngread.c:1440
105 105 1 :

['OSS_FUZZ_png_image_error']

105 105 OSS_FUZZ_png_image_finish_read call site: 00494 /src/libpng/pngread.c:4037
104 203 7 :

['OSS_FUZZ_png_error', 'OSS_FUZZ_png_gamma_correct', 'OSS_FUZZ_png_warning', 'OSS_FUZZ_png_reciprocal2', 'OSS_FUZZ_png_reciprocal', 'OSS_FUZZ_png_gamma_significant', 'OSS_FUZZ_png_gamma_8bit_correct']

104 203 OSS_FUZZ_png_init_read_transformations call site: 00277 /src/libpng/pngrtran.c:1671
100 100 1 :

['png_cache_unknown_chunk']

185 257 OSS_FUZZ_png_handle_unknown call site: 00153 /src/libpng/pngrutil.c:2881
99 99 1 :

['OSS_FUZZ_png_set_rgb_coefficients']

203 438 OSS_FUZZ_png_init_read_transformations call site: 00237 /src/libpng/pngrtran.c:1512
91 91 1 :

['png_do_compose']

222 297 OSS_FUZZ_png_do_read_transformations call site: 00409 /src/libpng/pngrtran.c:4955
71 71 2 :

['OSS_FUZZ_png_set_strip_alpha', 'OSS_FUZZ_png_set_background_fixed']

78 1940 png_image_read_direct call site: 00632 /src/libpng/pngread.c:3695
50 50 2 :

['OSS_FUZZ_png_app_warning', 'OSS_FUZZ_png_app_error']

50 50 unsupported_gamma call site: 00585 /src/libpng/pngrtran.c:344
40 40 1 :

['OSS_FUZZ_png_set_rgb_to_gray_fixed']

152 2151 png_image_read_direct call site: 00623 /src/libpng/pngread.c:3570
34 34 1 :

['OSS_FUZZ_png_set_expand_16']

112 2008 png_image_read_direct call site: 00629 /src/libpng/pngread.c:3679
27 37 2 :

['png_do_rgb_to_gray', 'OSS_FUZZ_png_warning']

249 359 OSS_FUZZ_png_do_read_transformations call site: 00405 /src/libpng/pngrtran.c:4893

Runtime coverage analysis

Covered functions
212
Functions that are reachable but not covered
63
Reachable functions
196
Percentage of reachable functions covered
67.86%
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/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc 3
/src/libpng/png.c 33
/src/libpng/pngread.c 32
/src/libpng/pngmem.c 10
/src/libpng/pngerror.c 20
/src/libpng/pngrio.c 2
/src/libpng/pngrtran.c 38
/src/libpng/pngrutil.c 23
/src/libpng/pngset.c 5
/src/libpng/pngget.c 3
/src/libpng/pngtrans.c 13

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
png_handle_iCCP /src/libpng/pngrutil.c 3 ['N/A', 'N/A', 'int'] 9 0 547 79 28 41 0 261 93
png_handle_iTXt /src/libpng/pngrutil.c 3 ['N/A', 'N/A', 'int'] 8 0 479 80 28 36 0 237 86
OSS_FUZZ_png_set_sCAL /src/libpng/pngset.c 5 ['N/A', 'N/A', 'int', 'double', 'double'] 5 0 67 9 4 18 0 124 81
OSS_FUZZ_png_set_quantize /src/libpng/pngrtran.c 6 ['N/A', 'N/A', 'int', 'int', 'N/A', 'int'] 6 0 1626 190 58 14 0 113 58
OSS_FUZZ_png_read_png /src/libpng/pngread.c 4 ['N/A', 'N/A', 'int', 'N/A'] 11 0 384 67 22 132 0 1317 46
png_handle_pCAL /src/libpng/pngrutil.c 3 ['N/A', 'N/A', 'int'] 8 0 498 64 23 27 0 159 43
OSS_FUZZ_png_check_keyword /src/libpng/pngset.c 3 ['N/A', 'N/A', 'N/A'] 3 0 246 46 17 7 0 65 39
OSS_FUZZ_png_set_cHRM_XYZ /src/libpng/pngset.c 11 ['N/A', 'N/A', 'double', 'double', 'double', 'double', 'double', 'double', 'double', 'double', 'double'] 6 0 74 3 2 14 0 70 39

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

Functions statically reachable by fuzzers
56.0%
225 / 401
Cyclomatic complexity statically reachable by fuzzers
72.0%
2312 / 3194

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/libpng/pngerror.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/pngrtran.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/png.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/libpng/pngrio.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/pngmem.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/pngset.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/pngrutil.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/pngread.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/pngget.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']
/src/libpng/pngtrans.c ['libpng_read_fuzzer'] ['libpng_read_fuzzer']

Directories in report

Directory
/usr/local/bin/../include/c++/v1/
/src/libpng/
/src/libpng/contrib/oss-fuzz/