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: stb_png_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 22 10.1%
gold [1:9] 9 4.16%
yellow [10:29] 15 6.94%
greenyellow [30:49] 4 1.85%
lawngreen 50+ 166 76.8%
All colors 216 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
11 11 1 :

['stbi__de_iphone(stbi__png*)']

11 44 stbi__parse_png_file(stbi__png*,int,int) call site: 00000 /src/stb/tests/../stb_image.h:5222
3 3 1 :

['stbi__refill_buffer(stbi__context*)']

3 3 stbi__get8(stbi__context*) call site: 00000 /src/stb/tests/../stb_image.h:1618
0 2 1 :

['stbi__err(char const*)']

0 2 stbi__load_main(stbi__context*,int*,int*,int*,int,stbi__result_info*,int) call site: 00000 /src/stb/tests/../stb_image.h:1147
0 2 1 :

['stbi__err(char const*)']

0 2 stbi__do_png(stbi__png*,int*,int*,int*,int,stbi__result_info*) call site: 00000 /src/stb/tests/../stb_image.h:5270
0 2 1 :

['stbi__err(char const*)']

0 2 stbi__convert_format(unsignedchar*,int,int,unsignedint,unsignedint) call site: 00000 /src/stb/tests/../stb_image.h:1764
0 2 1 :

['stbi__err(char const*)']

0 2 stbi__convert_format16(unsignedshort*,int,int,unsignedint,unsignedint) call site: 00000 /src/stb/tests/../stb_image.h:1821
0 2 1 :

['stbi__err(char const*)']

0 2 stbi__info_main(stbi__context*,int*,int*,int*) call site: 00000 /src/stb/tests/../stb_image.h:7639
0 0 None 0 11 stbi__parse_png_file(stbi__png*,int,int) call site: 00000 /src/stb/tests/../stb_image.h:5229
0 0 None 0 2 stbi__compute_huffman_codes(stbi__zbuf*) call site: 00000 /src/stb/tests/../stb_image.h:4393
0 0 None 0 0 stbi__skip(stbi__context*,int) call site: 00000 /src/stb/tests/../stb_image.h:1647
0 0 None 0 0 stbi__skip(stbi__context*,int) call site: 00000 /src/stb/tests/../stb_image.h:1651
0 0 None 0 0 stbi__getn(stbi__context*,unsignedchar*,int) call site: 00000 /src/stb/tests/../stb_image.h:1668

Runtime coverage analysis

Covered functions
55
Functions that are reachable but not covered
14
Reachable functions
120
Percentage of reachable functions covered
88.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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/stb/tests/stbi_read_fuzzer.c 1
stb_image.h 60

Fuzzer: stbi_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 501 54.5%
gold [1:9] 129 14.0%
yellow [10:29] 108 11.7%
greenyellow [30:49] 47 5.11%
lawngreen 50+ 133 14.4%
All colors 918 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
372 372 3 :

['stbi__bmp_set_mask_defaults(stbi__bmp_data*, int)', 'stbi__get16le(stbi__context*)', 'stbi__get32le(stbi__context*)']

372 390 stbi__bmp_parse_header(stbi__context*,stbi__bmp_data*) call site: 00000 /src/stb/tests/../stb_image.h:5451
150 163 4 :

['stbi__pnm_skip_whitespace(stbi__context*, char*)', 'stbi__get8(stbi__context*)', 'stbi__err(char const*)', 'stbi__pnm_getinteger(stbi__context*, char*)']

150 163 stbi__pnm_info(stbi__context*,int*,int*,int*) call site: 00000 /src/stb/tests/../stb_image.h:7595
61 63 3 :

['stbi__convert_format(unsigned char*, int, int, unsigned int, unsigned int)', 'stbi__convert_format16(unsigned short*, int, int, unsigned int, unsigned int)', 'stbi__err(char const*)']

61 63 stbi__do_png(stbi__png*,int*,int*,int*,int,stbi__result_info*) call site: 00000 /src/stb/tests/../stb_image.h:5267
54 54 1 :

['stbi__jpeg_get_bit(stbi__jpeg*)']

54 102 stbi__jpeg_decode_block_prog_ac(stbi__jpeg*,short*,stbi__huffman*,short*) call site: 00000 /src/stb/tests/../stb_image.h:2300
51 58 3 :

['stbi__get16le(stbi__context*)', 'stbi__get8(stbi__context*)', 'stbi__get32le(stbi__context*)']

51 58 stbi__bmp_test_raw(stbi__context*) call site: 00000 /src/stb/tests/../stb_image.h:5350
28 63 3 :

['stbi__gif_parse_colortable(stbi__context*, unsigned char (*) [4], int, int)', 'stbi__get16le(stbi__context*)', 'stbi__get8(stbi__context*)']

28 71 stbi__gif_header(stbi__context*,stbi__gif*,int*,int) call site: 00000 /src/stb/tests/../stb_image.h:6611
24 70 4 :

['stbi__get16le(stbi__context*)', 'stbi__get8(stbi__context*)', 'stbi__tga_get_comp(int, int, int*)', 'stbi__skip(stbi__context*, int)']

24 84 stbi__tga_info(stbi__context*,int*,int*,int*) call site: 00000 /src/stb/tests/../stb_image.h:5761
18 18 1 :

['stbi__jpeg_get_bit(stbi__jpeg*)']

18 18 stbi__jpeg_decode_block_prog_dc(stbi__jpeg*,short*,stbi__huffman*,int) call site: 00000 /src/stb/tests/../stb_image.h:2273
8 8 1 :

['stbi__convert_16_to_8(unsigned short*, int, int, int)']

12 12 stbi__load_and_postprocess_8bit(stbi__context*,int*,int*,int*,int) call site: 00000 /src/stb/tests/../stb_image.h:1271
3 3 1 :

['stbi__refill_buffer(stbi__context*)']

3 3 stbi__get8(stbi__context*) call site: 00000 /src/stb/tests/../stb_image.h:1618
0 78 4 :

['free', 'stbi__get8(stbi__context*)', 'stbi__err(char const*)', 'stbi__malloc_mad2(int, int, int)']

15 98 stbi__hdr_load(stbi__context*,int*,int*,int*,int,stbi__result_info*) call site: 00000 /src/stb/tests/../stb_image.h:7216
0 64 3 :

['stbi__get16be(stbi__context*)', 'stbi__skip(stbi__context*, int)', 'stbi__get32be(stbi__context*)']

0 72 stbi__psd_info(stbi__context*,int*,int*,int*) call site: 00000 /src/stb/tests/../stb_image.h:7365

Runtime coverage analysis

Covered functions
110
Functions that are reachable but not covered
91
Reachable functions
299
Percentage of reachable functions covered
69.57%
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
/src/stb/tests/stbi_read_fuzzer.c 1
stb_image.h 148

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.

/src/stb/tests/stbi_read_fuzzer.c

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=['stbi__convert_format16(unsigned short*, int, int, unsigned int, unsigned int)', 'stbi__convert_format(unsigned char*, int, int, unsigned int, unsigned int)', 'stbi__compute_transparency(stbi__png*, unsigned char*, int)', 'stbi__parse_png_file(stbi__png*, int, int)', 'stbi__check_png_header(stbi__context*)', 'stbi__compute_huffman_codes(stbi__zbuf*)', 'stbi__create_png_image_raw(stbi__png*, unsigned char*, unsigned int, int, unsigned int, unsigned int, int, int)', 'stbi__do_png(stbi__png*, int*, int*, int*, int, stbi__result_info*)', 'stbi__convert_16_to_8(unsigned short*, int, int, int)']

/src/stb/tests/stbi_read_fuzzer.c

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=['stbi__hdr_to_ldr(float*, int, int, int)', 'stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int)', 'stbi__bmp_parse_header(stbi__context*, stbi__bmp_data*)', 'stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int)', 'stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int)', 'stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int)', 'stbi__pnm_info(stbi__context*, int*, int*, int*)', 'stbi__do_png(stbi__png*, int*, int*, int*, int, stbi__result_info*)', 'stbi__tga_info(stbi__context*, int*, int*, int*)', 'stbi__hdr_load(stbi__context*, int*, int*, int*, int, stbi__result_info*)']