Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzzer details

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 15 9.43%
gold [1:9] 7 4.40%
yellow [10:29] 6 3.77%
greenyellow [30:49] 5 3.14%
lawngreen 50+ 126 79.2%
All colors 159 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
6 6 1 :

['byte_array_grow']

6 6 byte_array_append call site: 00066 /src/libplist/src/bytearray.c:76
2 2 1 :

['fwrite']

2 2 byte_array_append call site: 00065 /src/libplist/src/bytearray.c:68
0 32 2 :

['node_destroy', 'node_attach']

0 32 node_create call site: 00009 /src/libplist/libcnary/node.c:64
0 13 1 :

['plist_free_data']

0 113 node_from_openstep call site: 00019 /src/libplist/src/oplist.c:745
0 13 1 :

['plist_free_data']

0 109 node_from_openstep call site: 00019 /src/libplist/src/oplist.c:780
0 0 None 0 812 plist_from_openstep call site: 00001 /src/libplist/src/oplist.c:904
0 0 None 0 213 plist_dict_set_item call site: 00110 /src/libplist/src/plist.c:895
0 0 None 0 96 node_from_openstep call site: 00019 /src/libplist/src/oplist.c:639
0 0 None 0 46 plist_array_append_item call site: 00028 /src/libplist/src/plist.c:712
0 0 None 0 13 node_insert call site: 00126 /src/libplist/libcnary/node.c:106
0 0 None 0 8 plist_get_string_ptr call site: 00107 /src/libplist/src/plist.c:1289
0 0 None 0 0 node_create call site: 00009 /src/libplist/libcnary/node.c:52

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 16 9.58%
gold [1:9] 17 10.1%
yellow [10:29] 5 2.99%
greenyellow [30:49] 4 2.39%
lawngreen 50+ 125 74.8%
All colors 167 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
0 32 2 :

['node_destroy', 'node_attach']

0 32 node_create call site: 00044 /src/libplist/libcnary/node.c:64
0 0 None 16 1042 parse_dict_node call site: 00155 /src/libplist/src/bplist.c:534
0 0 None 10 272 plist_from_bin call site: 00001 /src/libplist/src/bplist.c:845
0 0 None 8 1058 parse_bin_node call site: 00035 /src/libplist/src/bplist.c:625
0 0 None 4 4 plist_utf16be_to_utf8 call site: 00095 /src/libplist/src/bplist.c:386
0 0 None 2 41 parse_string_node call site: 00086 /src/libplist/src/bplist.c:360
0 0 None 0 259 plist_from_bin call site: 00017 /src/libplist/src/bplist.c:926
0 0 None 0 39 parse_data_node call site: 00078 /src/libplist/src/bplist.c:467
0 0 None 0 0 node_create call site: 00044 /src/libplist/libcnary/node.c:52
0 0 None 0 0 node_list_create call site: 00047 /src/libplist/libcnary/node_list.c:39
0 0 None 0 0 node_list_remove call site: 00051 /src/libplist/libcnary/node_list.c:135
0 0 None 0 0 node_list_remove call site: 00051 /src/libplist/libcnary/node_list.c:137

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 34 13.0%
gold [1:9] 21 8.07%
yellow [10:29] 13 5.0%
greenyellow [30:49] 11 4.23%
lawngreen 50+ 181 69.6%
All colors 260 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
8 8 2 :

['strlen', 'hash_table_lookup']

8 8 plist_dict_get_item call site: 00190 /src/libplist/src/plist.c:868
0 32 2 :

['node_destroy', 'node_attach']

0 32 node_create call site: 00052 /src/libplist/libcnary/node.c:64
0 0 None 50 1891 node_from_xml call site: 00041 /src/libplist/src/xplist.c:1109
0 0 None 50 1891 node_from_xml call site: 00102 /src/libplist/src/xplist.c:1166
0 0 None 50 1891 node_from_xml call site: 00164 /src/libplist/src/xplist.c:1294
0 0 None 50 1891 node_from_xml call site: 00174 /src/libplist/src/xplist.c:1328
0 0 None 50 1891 node_from_xml call site: 00234 /src/libplist/src/xplist.c:1395
0 0 None 17 213 plist_dict_set_item call site: 00186 /src/libplist/src/plist.c:895
0 0 None 7 7 plist_dict_set_item call site: 00213 /src/libplist/src/plist.c:916
0 0 None 2 41 text_parts_get_content call site: 00102 /src/libplist/src/xplist.c:917
0 0 None 2 4 plist_get_type_and_value call site: 00251 /src/libplist/src/plist.c:1207
0 0 None 0 524 plist_from_xml call site: 00001 /src/libplist/src/xplist.c:1476

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

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 20 12.3%
gold [1:9] 4 2.46%
yellow [10:29] 2 1.23%
greenyellow [30:49] 1 0.61%
lawngreen 50+ 135 83.3%
All colors 162 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
0 32 2 :

['node_destroy', 'node_attach']

0 32 node_create call site: 00024 /src/libplist/libcnary/node.c:64
0 0 None 2 819 plist_from_json call site: 00001 /src/libplist/src/jplist.c:793
0 0 None 2 817 plist_from_json call site: 00003 /src/libplist/src/jplist.c:810
0 0 None 0 213 plist_dict_set_item call site: 00120 /src/libplist/src/plist.c:895
0 0 None 0 48 parse_array call site: 00074 /src/libplist/src/jplist.c:695
0 0 None 0 48 parse_object call site: 00093 /src/libplist/src/jplist.c:743
0 0 None 0 46 plist_array_append_item call site: 00105 /src/libplist/src/plist.c:712
0 0 None 0 13 node_insert call site: 00136 /src/libplist/libcnary/node.c:106
0 0 None 0 0 node_create call site: 00024 /src/libplist/libcnary/node.c:52
0 0 None 0 0 node_list_create call site: 00027 /src/libplist/libcnary/node_list.c:39
0 0 None 0 0 node_list_insert call site: 00139 /src/libplist/libcnary/node_list.c:99
0 0 None 0 0 node_list_insert call site: 00139 /src/libplist/libcnary/node_list.c:114

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

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 70 11 5 73 0 502 408
plist_read_from_file /src/libplist/src/plist.c 3 ['N/A', 'N/A', 'N/A'] 10 0 170 25 11 127 0 1105 65
timelocal64 /src/libplist/src/time64.c 1 ['N/A'] 3 0 16 3 2 11 0 50 46
plist_sort /src/libplist/src/plist.c 1 ['N/A'] 4 0 266 40 14 11 1 65 42
plist_write_to_string /src/libplist/src/plist.c 5 ['N/A', 'N/A', 'N/A', 'int', 'int'] 6 0 106 11 12 39 0 324 38
plist_dict_merge /src/libplist/src/plist.c 2 ['N/A', 'N/A'] 7 0 110 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
64.0%
167 / 260
Cyclomatic complexity statically reachable by fuzzers
79.0%
1600 / 2019

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 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/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', 'parse_string_node', 'node_create', 'parse_data_node', 'plist_free_data', 'parse_unicode_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']

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', 'node_create', 'unescape_string']

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

Directories in report

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