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

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 5 23.8%
gold [1:9] 10 47.6%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 6 28.5%
All colors 21 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 2 24 coap_log_impl call site: 00000 /src/libcoap/src/coap_debug.c:1204

Runtime coverage analysis

Covered functions
14
Functions that are reachable but not covered
12
Reachable functions
26
Percentage of reachable functions covered
53.85%
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 1
src/coap_notls.c 2
src/coap_tcp.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 52 19.7%
gold [1:9] 11 4.18%
yellow [10:29] 2 0.76%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 198 75.2%
All colors 263 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 35 2 :

['coap_log_impl', 'coap_get_log_level']

0 35 coap_pdu_resize call site: 00019 /src/libcoap/src/coap_pdu.c:271
0 2 1 :

['coap_free_type']

0 2 coap_pdu_init call site: 00006 /src/libcoap/src/coap_pdu.c:141
0 0 None 2 261 coap_split_uri_sub call site: 00080 /src/libcoap/src/coap_uri.c:103
0 0 None 2 24 coap_log_impl call site: 00117 /src/libcoap/src/coap_debug.c:1204
0 0 None 0 70 coap_pdu_parse_header call site: 00022 /src/libcoap/src/coap_pdu.c:1008
0 0 None 0 39 coap_pdu_resize call site: 00017 /src/libcoap/src/coap_pdu.c:262
0 0 None 0 35 coap_pdu_parse_header call site: 00024 /src/libcoap/src/coap_pdu.c:1017
0 0 None 0 35 coap_pdu_parse_header call site: 00025 /src/libcoap/src/coap_pdu.c:1022
0 0 None 0 35 coap_pdu_parse_opt call site: 00000 /src/libcoap/src/coap_pdu.c:1277
0 0 None 0 0 coap_option_filter_op call site: 00034 /src/libcoap/src/coap_option.c:479
0 0 None 0 0 coap_pdu_resize call site: 00021 /src/libcoap/src/coap_pdu.c:280
0 0 None 0 0 coap_get_data_large call site: 00171 /src/libcoap/src/coap_pdu.c:819

Runtime coverage analysis

Covered functions
63
Functions that are reachable but not covered
15
Reachable functions
78
Percentage of reachable functions covered
80.77%
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_pdu.c 10
src/coap_mem.c 3
src/coap_debug.c 12
src/coap_uri.c 6
src/coap_option.c 12
src/coap_encode.c 3
src/coap_str.c 2
src/coap_notls.c 2
src/coap_tcp.c 1
src/coap_ws.c 2
src/coap_time.c 3
src/coap_block.c 1

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 52 19.7%
gold [1:9] 13 4.94%
yellow [10:29] 1 0.38%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 197 74.9%
All colors 263 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 35 2 :

['coap_log_impl', 'coap_get_log_level']

0 35 coap_pdu_resize call site: 00019 /src/libcoap/src/coap_pdu.c:271
0 2 1 :

['coap_free_type']

0 2 coap_pdu_init call site: 00006 /src/libcoap/src/coap_pdu.c:141
0 0 None 2 261 coap_split_uri_sub call site: 00080 /src/libcoap/src/coap_uri.c:103
0 0 None 2 24 coap_log_impl call site: 00117 /src/libcoap/src/coap_debug.c:1204
0 0 None 0 39 coap_pdu_resize call site: 00017 /src/libcoap/src/coap_pdu.c:262
0 0 None 0 35 coap_pdu_parse_opt call site: 00000 /src/libcoap/src/coap_pdu.c:1277
0 0 None 0 0 coap_option_filter_op call site: 00034 /src/libcoap/src/coap_option.c:479
0 0 None 0 0 coap_pdu_resize call site: 00021 /src/libcoap/src/coap_pdu.c:280
0 0 None 0 0 coap_get_data_large call site: 00171 /src/libcoap/src/coap_pdu.c:819
0 0 None 0 0 coap_pdu_parse_header_size call site: 00015 /src/libcoap/src/coap_pdu.c:925

Runtime coverage analysis

Covered functions
63
Functions that are reachable but not covered
15
Reachable functions
78
Percentage of reachable functions covered
80.77%
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_pdu.c 10
src/coap_mem.c 3
src/coap_debug.c 12
src/coap_uri.c 6
src/coap_option.c 12
src/coap_encode.c 3
src/coap_str.c 2
src/coap_notls.c 2
src/coap_tcp.c 1
src/coap_ws.c 2
src/coap_time.c 3
src/coap_block.c 1

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 49 18.6%
gold [1:9] 12 4.56%
yellow [10:29] 1 0.38%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 201 76.4%
All colors 263 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 35 2 :

['coap_log_impl', 'coap_get_log_level']

0 35 coap_pdu_resize call site: 00019 /src/libcoap/src/coap_pdu.c:271
0 2 1 :

['coap_free_type']

0 2 coap_pdu_init call site: 00006 /src/libcoap/src/coap_pdu.c:141
0 0 None 2 261 coap_split_uri_sub call site: 00080 /src/libcoap/src/coap_uri.c:103
0 0 None 2 24 coap_log_impl call site: 00117 /src/libcoap/src/coap_debug.c:1204
0 0 None 0 70 coap_pdu_parse_header call site: 00022 /src/libcoap/src/coap_pdu.c:1008
0 0 None 0 39 coap_pdu_resize call site: 00017 /src/libcoap/src/coap_pdu.c:262
0 0 None 0 35 coap_pdu_parse_opt call site: 00000 /src/libcoap/src/coap_pdu.c:1277
0 0 None 0 0 coap_option_filter_op call site: 00034 /src/libcoap/src/coap_option.c:479
0 0 None 0 0 coap_pdu_resize call site: 00021 /src/libcoap/src/coap_pdu.c:280
0 0 None 0 0 coap_get_data_large call site: 00171 /src/libcoap/src/coap_pdu.c:819
0 0 None 0 0 coap_pdu_encode_header call site: 00251 /src/libcoap/src/coap_pdu.c:1449

Runtime coverage analysis

Covered functions
63
Functions that are reachable but not covered
15
Reachable functions
78
Percentage of reachable functions covered
80.77%
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_pdu.c 10
src/coap_mem.c 3
src/coap_debug.c 12
src/coap_uri.c 6
src/coap_option.c 12
src/coap_encode.c 3
src/coap_str.c 2
src/coap_notls.c 2
src/coap_tcp.c 1
src/coap_ws.c 2
src/coap_time.c 3
src/coap_block.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
coap_new_context /src/libcoap/src/coap_net.c 1 ['struct.coap_address_t *'] 48 0 255 53 17 444 0 4637 4068
coap_ws_read /src/libcoap/src/coap_ws.c 3 ['struct.coap_session_t.50 *', 'char *', 'size_t'] 30 0 733 118 47 420 2 4569 301
coap_persist_startup /src/libcoap/src/coap_threadsafe.c 5 ['struct.coap_context_t *', 'char *', 'char *', 'char *', 'int'] 54 0 33 6 3 423 0 4538 266
coap_new_client_session_oscore_psk /src/libcoap/src/coap_threadsafe.c 6 ['struct.coap_context_t *', 'struct.coap_address_t *', 'struct.coap_address_t *', 'int', 'struct.coap_dtls_cpsk_t *', 'struct.coap_oscore_conf_t *'] 48 0 34 6 3 418 0 4501 227
coap_send /src/libcoap/src/coap_threadsafe.c 2 ['struct.coap_session_t *', 'struct.coap_pdu_t *'] 51 0 34 6 3 400 0 4441 173
coap_resolve_address_info /src/libcoap/src/coap_address.c 8 ['struct.coap_str_const_t *', 'short', 'short', 'short', 'short', 'int', 'int', 'int'] 4 0 365 71 26 36 0 151 89
coap_new_oscore_conf /src/libcoap/src/coap_oscore.c 5 ['size_t', 'char *', 'func_type *', 'char *', 'size_t'] 8 0 45 8 4 37 0 157 79
coap_add_resource /src/libcoap/src/coap_threadsafe.c 2 ['struct.coap_context_t *', 'struct.coap_resource_t *'] 50 0 28 6 3 402 0 4347 52
coap_netif_dgrm_write /src/libcoap/src/coap_netif.c 3 ['struct.coap_session_t *', 'char *', 'size_t'] 6 0 105 20 8 42 0 170 47
coap_join_mcast_group_intf /src/libcoap/src/coap_threadsafe.c 3 ['struct.coap_context_t *', 'char *', 'char *'] 6 0 31 6 3 43 0 144 40

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

Functions statically reachable by fuzzers
63.0%
480 / 757
Cyclomatic complexity statically reachable by fuzzers
83.0%
5734 / 6916

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.

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']

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_log_impl', 'coap_pdu_encode_header', 'coap_pdu_clear', 'coap_pdu_init', 'coap_pdu_parse', 'coap_option_iterator_init', 'coap_get_query', 'coap_new_string']

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_log_impl', 'coap_pdu_clear', 'coap_pdu_init', 'coap_pdu_parse', 'coap_pdu_parse_header', 'coap_option_iterator_init', 'coap_get_query', 'coap_new_string']

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_log_impl', 'coap_pdu_clear', 'coap_pdu_init', 'coap_pdu_parse', 'coap_pdu_parse_header', 'coap_option_iterator_init', 'coap_get_query', 'coap_new_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/libcoap/src/coap_subscribe.c [] []
/src/libcoap/src/coap_hashkey.c [] []
/src/libcoap/tests/oss-fuzz/pdu_parse_udp_target.c ['pdu_parse_udp_fuzzer'] []
/src/libcoap/src/coap_notls.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/usr/include/x86_64-linux-gnu/bits/byteswap.h [] []
/usr/include/x86_64-linux-gnu/bits/socket.h [] []
/src/libcoap/src/coap_str.c ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/tests/oss-fuzz/split_uri_target.c ['split_uri_fuzzer'] []
/src/libcoap/src/oscore/oscore_context.c [] []
/src/libcoap/src/coap_async.c [] []
/src/libcoap/src/coap_encode.c ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_block.c ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/tests/oss-fuzz/pdu_parse_tcp_target.c ['pdu_parse_tcp_fuzzer'] []
/src/libcoap/src/coap_uri.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_netif.c [] []
/src/libcoap/src/coap_prng.c [] []
/src/libcoap/tests/oss-fuzz/pdu_parse_ws_target.c ['pdu_parse_ws_fuzzer'] []
/src/libcoap/src/coap_threadsafe.c [] []
/usr/include/stdlib.h [] []
/src/libcoap/./include/coap3/coap_uri.h [] []
/src/libcoap/src/oscore/oscore_cbor.c [] []
/src/libcoap/src/oscore/oscore_crypto.c [] []
/src/libcoap/src/coap_address.c [] []
/src/libcoap/src/coap_debug.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_tcp.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_sha1.c [] []
/src/libcoap/src/coap_session.c [] []
/src/libcoap/src/coap_dtls.c [] []
/src/libcoap/src/coap_pdu.c ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_mem.c ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_cache.c [] []
/src/libcoap/src/oscore/oscore.c [] []
/src/libcoap/src/coap_option.c ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_net.c [] []
/src/libcoap/src/oscore/oscore_cose.c [] []
/src/libcoap/src/coap_time.c ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_io.c [] []
/src/libcoap/./include/coap3/coap_address.h [] []
/src/libcoap/src/coap_ws.c ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer'] ['split_uri_fuzzer', 'pdu_parse_ws_fuzzer', 'pdu_parse_udp_fuzzer', 'pdu_parse_tcp_fuzzer']
/src/libcoap/src/coap_oscore.c [] []
/src/libcoap/src/coap_resource.c [] []

Directories in report

Directory
/usr/include/
/src/libcoap/./include/coap3/
/usr/include/x86_64-linux-gnu/bits/
/src/libcoap/src/oscore/
/src/libcoap/src/
/src/libcoap/tests/oss-fuzz/