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

Fuzzer details

Fuzzer: fuzz_textfile

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 14 19.1%
gold [1:9] 0 0.0%
yellow [10:29] 1 1.36%
greenyellow [30:49] 1 1.36%
lawngreen 50+ 57 78.0%
All colors 73 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
2 2 1 :

['__errno_location']

2 2 write_key_value call site: 00020 /src/bluez/src/textfile.c:173
0 0 None 20 32 write_key call site: 00041 /src/bluez/src/textfile.c:288
0 0 None 14 14 find_key call site: 00026 /src/bluez/src/textfile.c:137
0 0 None 10 10 write_key call site: 00014 /src/bluez/src/textfile.c:220
0 0 None 10 10 write_key call site: 00022 /src/bluez/src/textfile.c:237
0 0 None 10 10 write_key call site: 00038 /src/bluez/src/textfile.c:271
0 0 None 10 10 write_key call site: 00041 /src/bluez/src/textfile.c:282
0 0 None 10 10 write_key call site: 00044 /src/bluez/src/textfile.c:296
0 0 None 10 10 write_key call site: 00048 /src/bluez/src/textfile.c:305
0 0 None 8 8 write_key call site: 00012 /src/bluez/src/textfile.c:215
0 0 None 8 8 read_key call site: 00060 /src/bluez/src/textfile.c:343
0 0 None 8 8 read_key call site: 00062 /src/bluez/src/textfile.c:351

Runtime coverage analysis

Covered functions
9
Functions that are reachable but not covered
25
Reachable functions
34
Percentage of reachable functions covered
26.47%
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_textfile.c 2
blueztextfile.c 7

Fuzzer: fuzz_gobex

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 44 39.6%
gold [1:9] 9 8.10%
yellow [10:29] 8 7.20%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 50 45.0%
All colors 111 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
18 18 1 :

['g_obex_packet_set_data']

18 100 g_obex_packet_decode call site: 00015 /src/bluez/gobex/gobex-packet.c:357
8 8 1 :

['get_body']

8 8 g_obex_packet_encode call site: 00096 /src/bluez/gobex/gobex-packet.c:438
0 0 None 8 31 g_obex_packet_encode call site: 00095 /src/bluez/gobex/gobex-packet.c:416
0 0 None 4 16 g_obex_header_decode call site: 00056 /src/bluez/gobex/gobex-header.c:154
0 0 None 4 16 g_obex_header_decode call site: 00066 /src/bluez/gobex/gobex-header.c:199
0 0 None 4 8 g_obex_header_decode call site: 00050 /src/bluez/gobex/gobex-header.c:137
0 0 None 4 8 g_obex_packet_decode call site: 00002 /src/bluez/gobex/gobex-packet.c:320
0 0 None 4 8 g_obex_packet_decode call site: 00006 /src/bluez/gobex/gobex-packet.c:329
0 0 None 4 8 g_obex_packet_decode call site: 00011 /src/bluez/gobex/gobex-packet.c:343
0 0 None 0 2 g_obex_header_encode call site: 00104 /src/bluez/gobex/gobex-header.c:107
0 0 None 0 0 g_obex_header_encode call site: 00097 /src/bluez/gobex/gobex-header.c:88
0 0 None 0 0 g_obex_header_encode call site: 00099 /src/bluez/gobex/gobex-header.c:96

Runtime coverage analysis

Covered functions
17
Functions that are reachable but not covered
27
Reachable functions
43
Percentage of reachable functions covered
37.21%
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_gobex.c 1
bluez/gobex/gobex-packet.c 10
bluez/gobex/gobex-defs.c 1
bluez/gobex/gobex-header.c 11
bluezshared/util.c 2

Fuzzer: fuzz_sdp

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 19 16.3%
gold [1:9] 4 3.44%
yellow [10:29] 7 6.03%
greenyellow [30:49] 1 0.86%
lawngreen 50+ 85 73.2%
All colors 116 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
2 2 1 :

['syslog']

2 2 sdp_uuid_extract call site: 00038 /src/bluez/lib/sdp.c:998
2 2 1 :

['syslog']

2 2 sdp_uuid_extract call site: 00041 /src/bluez/lib/sdp.c:1005
2 2 1 :

['syslog']

2 2 sdp_extract_seqtype call site: 00007 /src/bluez/lib/sdp.c:1220
2 2 1 :

['syslog']

2 2 sdp_extract_seqtype call site: 00008 /src/bluez/lib/sdp.c:1229
2 2 1 :

['syslog']

2 2 sdp_extract_seqtype call site: 00010 /src/bluez/lib/sdp.c:1238
2 2 2 :

['syslog', 'free']

2 2 extract_int call site: 00023 /src/bluez/lib/sdp.c:1057
2 2 2 :

['syslog', 'free']

2 2 extract_int call site: 00025 /src/bluez/lib/sdp.c:1067
2 2 2 :

['syslog', 'free']

2 2 extract_int call site: 00029 /src/bluez/lib/sdp.c:1087
2 2 2 :

['syslog', 'free']

2 2 extract_seq call site: 00071 /src/bluez/lib/sdp.c:1269
0 0 None 10 26 extract_int call site: 00022 /src/bluez/lib/sdp.c:1032
0 0 None 10 18 extract_str call site: 00061 /src/bluez/lib/sdp.c:1136
0 0 None 4 10 sdp_data_alloc_with_length call site: 00097 /src/bluez/lib/sdp.c:350

Runtime coverage analysis

Covered functions
46
Functions that are reachable but not covered
11
Reachable functions
57
Percentage of reachable functions covered
80.7%
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_sdp.c 1
bluez/lib/sdp.c 36
bluez/lib/bluetooth.c 2
bluez/./lib/bluetooth/bluetooth.h 5
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
bluez/./lib/sdp_lib.h 2

Fuzzer: fuzz_xml

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 10 26.3%
gold [1:9] 2 5.26%
yellow [10:29] 3 7.89%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 23 60.5%
All colors 38 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 0 None 28 748 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:405
0 0 None 24 221 element_start call site: 00000 /src/bluez/src/sdp-xml.c:444
0 0 None 20 524 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:413
0 0 None 18 468 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:415
0 0 None 16 412 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:417
0 0 None 14 356 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:419
0 0 None 14 147 element_start call site: 00000 /src/bluez/src/sdp-xml.c:494
0 0 None 12 300 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:421
0 0 None 10 244 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:423
0 0 None 8 188 sdp_xml_parse_datatype call site: 00000 /src/bluez/src/sdp-xml.c:425
0 0 None 8 41 sdp_xml_parse_record call site: 00001 /src/bluez/src/sdp-xml.c:607
0 0 None 8 34 sdp_xml_parse_record call site: 00002 /src/bluez/src/sdp-xml.c:611

Runtime coverage analysis

Covered functions
43
Functions that are reachable but not covered
8
Reachable functions
21
Percentage of reachable functions covered
61.9%
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
fuzz_xml.c 2
bluezsdp-xml.c 4
bluez/lib/sdp.c 3
bluez/lib/bluetooth.c 1
bluez/./lib/sdp_lib.h 1

Fuzzer: fuzz_hci

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 0 0.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 2 100.%
All colors 2 100

Runtime coverage analysis

Covered functions
2
Functions that are reachable but not covered
0
Reachable functions
2
Percentage of reachable functions covered
100.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
fuzz_hci.c 1
bluez/lib/bluetooth.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
g_obex_new /src/bluez/gobex/gobex.c 4 ['struct._GIOChannel *', 'int', 'size_t', 'size_t'] 17 0 252 35 11 145 0 606 433
sdp_service_search_attr_req /src/bluez/lib/sdp.c 5 ['struct.sdp_session_t *', 'struct._sdp_list *', 'int', 'struct._sdp_list *', 'struct._sdp_list **'] 7 0 556 65 25 72 0 366 182
transfer_response /src/bluez/gobex/gobex-transfer.c 4 ['struct._GObex *', 'struct._GError *', 'struct._GObexPacket *', 'char *'] 20 0 221 33 13 130 6 503 122
element_start /src/bluez/src/sdp-xml.c 6 ['struct._GMarkupParseContext *', 'char *', 'char **', 'char **', 'char *', 'struct._GError **'] 7 0 358 45 16 36 0 155 98
hci_read_remote_name /src/bluez/lib/hci.c 5 ['int', 'struct.bdaddr_t *', 'int', 'char *', 'int'] 4 0 32 3 2 18 0 72 66
g_obex_get_rsp /src/bluez/gobex/gobex-transfer.c 6 ['struct._GObex *', 'func_type *', 'func_type *', 'char *', 'struct._GError **', 'int'] 20 0 65 6 3 129 0 481 52
sdp_connect /src/bluez/lib/sdp.c 3 ['struct.bdaddr_t *', 'struct.bdaddr_t *', 'int'] 3 0 132 22 9 17 0 63 47
hci_devid /src/bluez/lib/hci.c 1 ['char *'] 3 0 68 12 5 19 0 64 44
sdp_record_register /src/bluez/lib/sdp.c 3 ['struct.sdp_session_t *', 'struct.sdp_record_t *', 'char'] 10 0 38 3 2 55 0 270 38

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

Functions statically reachable by fuzzers
47.0%
243 / 521
Cyclomatic complexity statically reachable by fuzzers
74.0%
3753 / 5067

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

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/bluez/src/sdp-xml.c ['fuzz_xml'] ['fuzz_xml']
/src/bluez/./lib/bluetooth.h [] []
/src/bluez/lib/bluetooth.c ['fuzz_sdp', 'fuzz_xml', 'fuzz_hci'] ['fuzz_sdp', 'fuzz_xml', 'fuzz_hci']
/src/bluez/./lib/sdp_lib.h ['fuzz_sdp', 'fuzz_xml'] []
/src/bluez/gobex/gobex-defs.c ['fuzz_gobex'] ['fuzz_gobex']
/src/bluez/src/shared/util.c ['fuzz_gobex'] []
/src/bluez/lib/sdp.c ['fuzz_sdp', 'fuzz_xml'] ['fuzz_sdp', 'fuzz_xml']
/src/bluez/gobex/gobex-packet.c ['fuzz_gobex'] ['fuzz_gobex']
/src/bluez/./lib/hci_lib.h [] []
/src/bluez/gobex/gobex.c [] []
/src/fuzz_textfile.c ['fuzz_textfile'] ['fuzz_textfile']
/src/bluez/lib/hci.c [] []
/src/fuzz_gobex.c ['fuzz_gobex'] ['fuzz_gobex']
/src/bluez/./lib/bluetooth/bluetooth.h ['fuzz_sdp'] []
/src/bluez/gobex/gobex-header.c ['fuzz_gobex'] ['fuzz_gobex']
/src/fuzz_xml.c ['fuzz_xml'] ['fuzz_xml']
/src/bluez/gobex/gobex-debug.h [] []
/src/bluez/src/textfile.c ['fuzz_textfile'] ['fuzz_textfile']
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['fuzz_sdp'] []
/src/fuzz_hci.c ['fuzz_hci'] ['fuzz_hci']
/src/fuzz_sdp.c ['fuzz_sdp'] ['fuzz_sdp']
/src/bluez/gobex/gobex-apparam.c [] []
/src/bluez/gobex/gobex-transfer.c [] []
/src/bluez/./src/shared/util.h [] []

Directories in report

Directory
/src/bluez/./lib/
/src/bluez/lib/
/src/bluez/src/shared/
/src/
/src/bluez/./src/shared/
/src/bluez/./lib/bluetooth/
/src/bluez/src/
/usr/include/x86_64-linux-gnu/bits/
/src/bluez/gobex/