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: split_uri_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 9 17.6%
gold [1:9] 15 29.4%
yellow [10:29] 2 3.92%
greenyellow [30:49] 2 3.92%
lawngreen 50+ 23 45.0%
All colors 51 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
2 30 coap_split_uri_sub call site: 00030 coap_log_impl
2 37 coap_ws_is_supported call site: 00037 coap_log_impl
2 43 coap_split_uri_sub call site: 00043 coap_log_impl
1 0 EP call site: 00000 coap_split_uri
1 7 coap_log_impl call site: 00007 vsnprintf
1 19 coap_log_impl call site: 00019 snprintf

Runtime coverage analysis

Covered functions
14
Functions that are reachable but not covered
14
Reachable functions
28
Percentage of reachable functions covered
50.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
tests/oss-fuzz/split_uri_target.c 1
src/coap_uri.c 2
src/coap_debug.c 4
src/coap_time.c 3
src/coap_notls.c 2
src/coap_strm_posix.c 1
src/coap_ws.c 2

Fuzzer: pdu_parse_ws_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 87 20.5%
gold [1:9] 15 3.54%
yellow [10:29] 10 2.36%
greenyellow [30:49] 2 0.47%
lawngreen 50+ 309 73.0%
All colors 423 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
14 379 coap_pdu_encode_header call site: 00379 coap_log_impl
8 223 coap_show_pdu call site: 00223 coap_log_impl
8 328 coap_show_pdu call site: 00328 coap_log_impl
5 398 coap_lock_lock_func call site: 00398 coap_log_impl
4 56 coap_pdu_parse2 call site: 00056 coap_log_impl
4 97 coap_pdu_parse_opt call site: 00097 coap_log_impl
4 146 coap_get_query call site: 00146 coap_log_impl
3 372 coap_pdu_encode_header call site: 00372 coap_log_impl
2 25 coap_pdu_clear call site: 00025 coap_pdu_parse
2 31 coap_pdu_parse2 call site: 00031 coap_log_impl
2 53 coap_realloc_type call site: 00053 coap_log_impl
2 61 coap_pdu_parse_header call site: 00061 coap_log_impl

Runtime coverage analysis

Covered functions
77
Functions that are reachable but not covered
20
Reachable functions
97
Percentage of reachable functions covered
79.38%
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
tests/oss-fuzz/pdu_parse_ws_target.c 1
src/coap_net.c 2
src/coap_time.c 4
src/coap_prng.c 1
src/coap_mem.c 4
src/coap_notls.c 5
src/coap_pdu.c 18
src/coap_debug.c 13
src/coap_option.c 12
src/coap_encode.c 3
src/coap_uri.c 6
src/coap_str.c 3
src/coap_strm_posix.c 1
src/coap_ws.c 2
src/coap_block.c 1
src/coap_threadsafe.c 2

Fuzzer: pdu_parse_tcp_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 84 19.8%
gold [1:9] 15 3.54%
yellow [10:29] 12 2.83%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 312 73.7%
All colors 423 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
8 223 coap_show_pdu call site: 00223 coap_log_impl
8 328 coap_show_pdu call site: 00328 coap_log_impl
5 388 coap_pdu_encode_header call site: 00388 coap_log_impl
5 398 coap_lock_lock_func call site: 00398 coap_log_impl
4 97 coap_pdu_parse_opt call site: 00097 coap_log_impl
4 146 coap_get_query call site: 00146 coap_log_impl
3 56 coap_pdu_parse2 call site: 00056 coap_log_impl
3 60 coap_pdu_parse_header call site: 00060 coap_log_impl
3 372 coap_pdu_encode_header call site: 00372 coap_log_impl
2 25 coap_pdu_clear call site: 00025 coap_pdu_parse
2 31 coap_pdu_parse2 call site: 00031 coap_log_impl
2 53 coap_realloc_type call site: 00053 coap_log_impl

Runtime coverage analysis

Covered functions
77
Functions that are reachable but not covered
20
Reachable functions
97
Percentage of reachable functions covered
79.38%
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
tests/oss-fuzz/pdu_parse_tcp_target.c 1
src/coap_net.c 2
src/coap_time.c 4
src/coap_prng.c 1
src/coap_mem.c 4
src/coap_notls.c 5
src/coap_pdu.c 18
src/coap_debug.c 13
src/coap_option.c 12
src/coap_encode.c 3
src/coap_uri.c 6
src/coap_str.c 3
src/coap_strm_posix.c 1
src/coap_ws.c 2
src/coap_block.c 1
src/coap_threadsafe.c 2

Fuzzer: pdu_parse_udp_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 86 20.3%
gold [1:9] 17 4.01%
yellow [10:29] 12 2.83%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 308 72.8%
All colors 423 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
20 373 coap_pdu_encode_header call site: 00373 coap_log_impl
8 223 coap_show_pdu call site: 00223 coap_log_impl
8 328 coap_show_pdu call site: 00328 coap_log_impl
5 398 coap_lock_lock_func call site: 00398 coap_log_impl
4 59 coap_pdu_parse_header call site: 00059 coap_log_impl
4 97 coap_pdu_parse_opt call site: 00097 coap_log_impl
4 146 coap_get_query call site: 00146 coap_log_impl
2 25 coap_pdu_clear call site: 00025 coap_pdu_parse
2 31 coap_pdu_parse2 call site: 00031 coap_log_impl
2 53 coap_realloc_type call site: 00053 coap_log_impl
2 69 coap_pdu_parse_opt call site: 00069 coap_log_impl
2 155 coap_new_string call site: 00155 coap_log_impl

Runtime coverage analysis

Covered functions
77
Functions that are reachable but not covered
20
Reachable functions
97
Percentage of reachable functions covered
79.38%
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
tests/oss-fuzz/pdu_parse_udp_target.c 1
src/coap_net.c 2
src/coap_time.c 4
src/coap_prng.c 1
src/coap_mem.c 4
src/coap_notls.c 5
src/coap_pdu.c 18
src/coap_debug.c 13
src/coap_option.c 12
src/coap_encode.c 3
src/coap_uri.c 6
src/coap_str.c 3
src/coap_strm_posix.c 1
src/coap_ws.c 2
src/coap_block.c 1
src/coap_threadsafe.c 2

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
coap_ws_close /src/libcoap/src/coap_ws.c 1 ['N/A'] 32 0 378 50 17 514 2 5847 5249
coap_new_context /src/libcoap/src/coap_net.c 1 ['N/A'] 53 0 311 69 20 526 0 5823 209
coap_persist_startup /src/libcoap/src/coap_subscribe.c 5 ['N/A', 'N/A', 'N/A', 'N/A', 'int'] 59 0 51 10 3 510 0 5777 172
hnd_get_wellknown_lkd /src/libcoap/src/coap_net.c 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 31 0 304 50 16 497 0 5709 108
coap_new_oscore_conf /src/libcoap/src/coap_oscore.c 5 ['size_t', 'N/A', 'N/A', 'N/A', 'size_t'] 8 0 74 11 4 38 0 165 85
coap_netif_dgrm_write /src/libcoap/src/coap_netif.c 3 ['N/A', 'N/A', 'size_t'] 8 0 155 30 9 63 0 306 60
coap_io_process_loop /src/libcoap/src/coap_io_posix.c 5 ['N/A', 'N/A', 'N/A', 'int', 'int'] 60 0 59 12 4 498 0 5652 51
coap_add_resource /src/libcoap/src/coap_resource.c 2 ['N/A', 'N/A'] 58 0 34 9 3 496 0 5667 46
coap_session_set_type_server /src/libcoap/src/coap_session.c 1 ['N/A'] 56 0 39 10 3 494 0 5645 42
coap_op_resource_deleted /src/libcoap/src/coap_subscribe.c 3 ['N/A', 'N/A', 'N/A'] 6 0 252 40 16 40 0 135 40

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

Functions statically reachable by fuzzers
61.0%
538 / 876
Cyclomatic complexity statically reachable by fuzzers
83.0%
6541 / 7914

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.

tests/oss-fuzz/split_uri_target.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=['coap_split_uri_sub', 'coap_ws_is_supported', 'coap_log_impl']

tests/oss-fuzz/pdu_parse_ws_target.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=['coap_pdu_encode_header', 'coap_show_pdu', 'coap_lock_lock_func', 'coap_pdu_parse2', 'coap_pdu_parse_opt', 'coap_get_query', 'coap_pdu_clear']

tests/oss-fuzz/pdu_parse_tcp_target.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=['coap_show_pdu', 'coap_pdu_encode_header', 'coap_lock_lock_func', 'coap_pdu_parse_opt', 'coap_get_query', 'coap_pdu_parse2', 'coap_pdu_parse_header', 'coap_pdu_clear']

tests/oss-fuzz/pdu_parse_udp_target.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=['coap_pdu_encode_header', 'coap_show_pdu', 'coap_lock_lock_func', 'coap_pdu_parse_header', 'coap_pdu_parse_opt', 'coap_get_query', 'coap_pdu_clear', 'coap_pdu_parse2', 'coap_realloc_type']

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/libcoap/src/coap_threadsafe.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_block.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/tests/oss-fuzz/pdu_parse_udp_target.c ['pdu_parse_udp_fuzzer'] []
/src/libcoap/src/oscore/oscore.c [] []
/src/libcoap/src/coap_async.c [] []
/src/libcoap/src/oscore/oscore_cbor.c [] []
/src/libcoap/src/coap_prng.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_session.c [] []
/src/libcoap/src/coap_netif.c [] []
/src/libcoap/src/coap_uri.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/tests/oss-fuzz/pdu_parse_tcp_target.c ['pdu_parse_tcp_fuzzer'] []
/src/libcoap/src/coap_cache.c [] []
/src/libcoap/src/coap_debug.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/./include/coap3/coap_pdu_internal.h [] []
/src/libcoap/src/coap_time.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_subscribe.c [] []
/src/libcoap/src/coap_str.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_address.c [] []
/src/libcoap/tests/oss-fuzz/split_uri_target.c ['split_uri_fuzzer'] []
/src/libcoap/./include/coap3/coap_uri.h [] []
/src/libcoap/src/oscore/oscore_cose.c [] []
/src/libcoap/src/coap_dgrm_posix.c [] []
/src/libcoap/src/coap_strm_posix.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_io.c [] []
/src/libcoap/src/oscore/oscore_context.c [] []
/src/libcoap/src/coap_hashkey.c [] []
/src/libcoap/src/coap_pdu.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_mem.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_ws.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_option.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_dtls.c [] []
/src/libcoap/src/coap_resource.c [] []
/src/libcoap/src/coap_io_posix.c [] []
/src/libcoap/src/coap_net.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/oscore/oscore_crypto.c [] []
/src/libcoap/./include/coap3/coap_address.h [] []
/src/libcoap/src/coap_notls.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/tests/oss-fuzz/pdu_parse_ws_target.c ['pdu_parse_ws_fuzzer'] []
/src/libcoap/src/coap_encode.c ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_tcp_fuzzer', 'pdu_parse_udp_fuzzer']
/src/libcoap/src/coap_sha1.c [] []
/src/libcoap/src/coap_proxy.c [] []
/src/libcoap/src/coap_oscore.c [] []

Directories in report

Directory
/src/libcoap/./include/coap3/
/src/libcoap/src/oscore/
/src/libcoap/tests/oss-fuzz/
/src/libcoap/src/