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: jplist_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 13.5%
gold [1:9] 4 2.46%
yellow [10:29] 3 1.85%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 133 82.0%
All colors 162 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
4 28 node_attach call site: 00028 node_destroy
3 45 plist_new_int call site: 00045 plist_new_uint
2 76 plist_new_array call site: 00076 plist_free
2 95 plist_new_dict call site: 00095 plist_free
1 3 plist_from_json call site: 00003 fprintf
1 12 jsmn_parse_primitive call site: 00012 fprintf
1 16 plist_from_json call site: 00016 fprintf
1 22 plist_new_bool call site: 00022 node_create
1 24 node_create call site: 00024 node_attach
1 59 parse_primitive call site: 00059 fprintf
1 61 plist_from_json call site: 00061 fprintf
1 68 unescape_string call site: 00068 fprintf

Runtime coverage analysis

Covered functions
59
Functions that are reachable but not covered
14
Reachable functions
68
Percentage of reachable functions covered
79.41%
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
fuzz/jplist_fuzzer.cc 1
src/jplist.c 7
src/jsmn.c 6
src/plist.c 20
libcnary/node.c 8
libcnary/node_list.c 5
src/ptrarray.c 4
src/hashtable.c 4

Fuzzer: oplist_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 16 10.0%
gold [1:9] 7 4.40%
yellow [10:29] 9 5.66%
greenyellow [30:49] 1 0.62%
lawngreen 50+ 126 79.2%
All colors 159 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
4 13 node_attach call site: 00013 node_destroy
3 65 node_from_openstep call site: 00065 byte_array_grow
3 73 node_from_openstep call site: 00073 plist_free_data
2 81 node_from_openstep call site: 00081 plist_free_data
1 7 node_from_openstep call site: 00007 node_create
1 9 node_create call site: 00009 node_attach
1 22 node_from_openstep call site: 00022 fprintf
1 126 plist_dict_set_item call site: 00126 node_list_create

Runtime coverage analysis

Covered functions
50
Functions that are reachable but not covered
13
Reachable functions
58
Percentage of reachable functions covered
77.59%
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
fuzz/oplist_fuzzer.cc 1
src/oplist.c 4
src/plist.c 16
libcnary/node.c 8
libcnary/node_list.c 5
src/ptrarray.c 4
src/hashtable.c 4
src/bytearray.c 4

Fuzzer: bplist_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 13.1%
gold [1:9] 17 10.1%
yellow [10:29] 6 3.59%
greenyellow [30:49] 3 1.79%
lawngreen 50+ 119 71.2%
All colors 167 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
4 48 node_attach call site: 00048 node_destroy
3 155 parse_dict_node call site: 00155 plist_free
2 19 plist_from_bin call site: 00019 fprintf
2 81 plist_free_data call site: 00081 node_create
2 86 parse_string_node call site: 00086 plist_free_data
1 17 plist_from_bin call site: 00017 fprintf
1 44 node_create call site: 00044 node_attach
1 64 parse_int_node call site: 00064 node_create
1 69 parse_real_node call site: 00069 node_create
1 78 parse_data_node call site: 00078 plist_free_data
1 89 parse_string_node call site: 00089 node_create
1 95 parse_unicode_node call site: 00095 fprintf

Runtime coverage analysis

Covered functions
42
Functions that are reachable but not covered
9
Reachable functions
46
Percentage of reachable functions covered
80.43%
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
fuzz/bplist_fuzzer.cc 1
src/bplist.c 13
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
src/ptrarray.c 7
src/plist.c 5
libcnary/node.c 6
libcnary/node_list.c 4
src/hashtable.c 1

Fuzzer: xplist_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 36 13.8%
gold [1:9] 18 6.92%
yellow [10:29] 16 6.15%
greenyellow [30:49] 10 3.84%
lawngreen 50+ 180 69.2%
All colors 260 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
9 213 plist_dict_set_item call site: 00213 hash_table_insert
4 56 node_attach call site: 00056 node_destroy
3 5 find_next call site: 00005 find_char
2 119 unescape_entities call site: 00119 text_parts_free
2 128 node_from_xml call site: 00128 text_parts_free
2 164 node_from_xml call site: 00164 text_parts_free
2 174 node_from_xml call site: 00174 text_parts_free
2 190 plist_dict_get_item call site: 00190 hash_table_lookup
2 233 _plist_array_post_insert call site: 00233 fprintf
2 252 plist_get_type_and_value call site: 00252 strdup
1 9 find_next call site: 00009 fprintf
1 16 find_str call site: 00016 fprintf

Runtime coverage analysis

Covered functions
56
Functions that are reachable but not covered
18
Reachable functions
69
Percentage of reachable functions covered
73.91%
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
fuzz/xplist_fuzzer.cc 1
src/xplist.c 13
src/plist.c 18
libcnary/node.c 9
libcnary/node_list.c 5
src/ptrarray.c 4
src/hashtable.c 4
src/base64.c 1
src/time64.c 1

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
plist_write_to_file /src/libplist/src/plist.c 4 ['N/A', 'N/A', 'int', 'int'] 7 0 64 11 5 73 0 502 408
plist_read_from_file /src/libplist/src/plist.c 3 ['N/A', 'N/A', 'N/A'] 10 0 160 25 11 127 0 1117 65
timelocal64 /src/libplist/src/time64.c 1 ['N/A'] 3 0 15 3 2 11 0 50 46
plist_sort /src/libplist/src/plist.c 1 ['N/A'] 4 0 261 42 15 11 1 67 44
plist_write_to_string /src/libplist/src/plist.c 5 ['N/A', 'N/A', 'N/A', 'int', 'int'] 6 0 100 11 12 39 0 324 38
plist_dict_merge /src/libplist/src/plist.c 2 ['N/A', 'N/A'] 7 0 105 24 10 45 0 197 37

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

Functions statically reachable by fuzzers
63.0%
167 / 264
Cyclomatic complexity statically reachable by fuzzers
79.0%
1613 / 2047

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 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/jplist_fuzzer.cc

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=['node_attach', 'plist_new_int', 'plist_new_array', 'plist_new_dict', 'plist_from_json', 'jsmn_parse_primitive', 'plist_new_bool', 'node_create', 'parse_primitive']

fuzz/oplist_fuzzer.cc

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=['node_attach', 'node_from_openstep', 'node_create', 'plist_dict_set_item']

fuzz/bplist_fuzzer.cc

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=['node_attach', 'parse_dict_node', 'plist_from_bin', 'plist_free_data', 'parse_string_node', 'node_create', 'parse_int_node', 'parse_real_node', 'parse_data_node']

fuzz/xplist_fuzzer.cc

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=['plist_dict_set_item', 'node_attach', 'find_next', 'unescape_entities', 'node_from_xml', 'plist_dict_get_item', '_plist_array_post_insert', 'plist_get_type_and_value']

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/libplist/fuzz/jplist_fuzzer.cc ['jplist_fuzzer'] ['jplist_fuzzer']
/src/libplist/src/hashtable.c ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer'] ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer']
/src/libplist/src/jplist.c ['jplist_fuzzer'] ['jplist_fuzzer']
/src/libplist/fuzz/oplist_fuzzer.cc ['oplist_fuzzer'] ['oplist_fuzzer']
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['bplist_fuzzer'] []
/src/libplist/libcnary/node_list.c ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer'] ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer']
/src/libplist/src/jsmn.c ['jplist_fuzzer'] ['jplist_fuzzer']
/src/libplist/src/out-default.c [] []
/src/libplist/src/time64.c ['xplist_fuzzer'] ['xplist_fuzzer']
/src/libplist/src/out-limd.c [] []
/src/libplist/libcnary/node.c ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer'] ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer']
/src/libplist/fuzz/xplist_fuzzer.cc ['xplist_fuzzer'] ['xplist_fuzzer']
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h [] []
/src/libplist/src/oplist.c ['oplist_fuzzer'] ['oplist_fuzzer']
/src/libplist/src/out-plutil.c [] []
/src/libplist/src/plist.c ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer'] ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer']
/src/libplist/src/bytearray.c ['oplist_fuzzer'] ['oplist_fuzzer']
/src/libplist/src/ptrarray.c ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer'] ['jplist_fuzzer', 'oplist_fuzzer', 'bplist_fuzzer', 'xplist_fuzzer']
/src/libplist/src/xplist.c ['xplist_fuzzer'] ['xplist_fuzzer']
/src/libplist/src/base64.c ['xplist_fuzzer'] ['xplist_fuzzer']
/src/libplist/fuzz/bplist_fuzzer.cc ['bplist_fuzzer'] ['bplist_fuzzer']
/src/libplist/src/bplist.c ['bplist_fuzzer'] ['bplist_fuzzer']

Directories in report

Directory
/src/libplist/fuzz/
/src/libplist/libcnary/
/usr/include/x86_64-linux-gnu/bits/
/src/libplist/src/