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

Fuzzer details

Fuzzer: FuzzStun

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 35 45.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 42 54.5%
All colors 77 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
36 36 1 :

['stun_produce_integrity_key_str']

36 114 stun_check_message_integrity_str call site: 00028 /src/coturn/src/client/ns_turn_msg.c:1969
8 72 7 :

['strlen', 'stun_attr_get_value', 'memcmp', 'stun_get_command_message_len_str', 'stun_set_command_message_len_str', 'stun_calculate_hmac', 'get_hmackey_size']

8 72 stun_check_message_integrity_by_key_str call site: 00062 /src/coturn/src/client/ns_turn_msg.c:1906
8 72 7 :

['strlen', 'stun_attr_get_value', 'memcmp', 'stun_get_command_message_len_str', 'stun_set_command_message_len_str', 'stun_calculate_hmac', 'get_hmackey_size']

8 72 stun_check_message_integrity_by_key_str call site: 00062 /src/coturn/src/client/ns_turn_msg.c:1911
8 72 7 :

['strlen', 'stun_attr_get_value', 'memcmp', 'stun_get_command_message_len_str', 'stun_set_command_message_len_str', 'stun_calculate_hmac', 'get_hmackey_size']

8 72 stun_check_message_integrity_by_key_str call site: 00062 /src/coturn/src/client/ns_turn_msg.c:1916
4 4 1 :

['get_hmackey_size']

6 38 stun_check_message_integrity_by_key_str call site: 00064 /src/coturn/src/client/ns_turn_msg.c:1939
2 2 1 :

['EVP_sha256']

4 4 stun_calculate_hmac call site: 00068 /src/coturn/src/client/ns_turn_msg.c:121
2 2 1 :

['EVP_sha384']

4 4 stun_calculate_hmac call site: 00069 /src/coturn/src/client/ns_turn_msg.c:130
2 2 1 :

['EVP_sha512']

4 4 stun_calculate_hmac call site: 00070 /src/coturn/src/client/ns_turn_msg.c:139
0 0 None 2 4 stun_is_command_message_full_check_str call site: 00023 /src/coturn/src/client/ns_turn_msg.c:491
0 0 None 2 2 stun_check_message_integrity_by_key_str call site: 00075 /src/coturn/src/client/ns_turn_msg.c:1952
0 0 None 0 21 stun_attr_get_next_str call site: 00015 /src/coturn/src/client/ns_turn_msg.c:1431
0 0 None 0 6 stun_is_command_message_full_check_str call site: 00006 /src/coturn/src/client/ns_turn_msg.c:481

Runtime coverage analysis

Covered functions
17
Functions that are reachable but not covered
23
Reachable functions
40
Percentage of reachable functions covered
42.5%
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
/src/coturn/fuzzing/FuzzStun.c 1
client/ns_turn_msg.c 18

Fuzzer: FuzzStunClient

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] 2 9.52%
greenyellow [30:49] 3 14.2%
lawngreen 50+ 16 76.1%
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 0 0 stun_is_command_message call site: 00001 /src/coturn/src/apps/common/stun_buffer.c:73
0 0 None 0 0 stun_get_method_str call site: 00000 /src/coturn/src/client/ns_turn_msg.c:418
0 0 None 0 0 stun_get_msg_type_str call site: 00010 /src/coturn/src/client/ns_turn_msg.c:427
0 0 None 0 0 stun_is_success_response_str call site: 00015 /src/coturn/src/client/ns_turn_msg.c:511
0 0 None 0 0 stun_is_response_str call site: 00008 /src/coturn/src/client/ns_turn_msg.c:598

Runtime coverage analysis

Covered functions
12
Functions that are reachable but not covered
2
Reachable functions
14
Percentage of reachable functions covered
85.71%
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
/src/coturn/fuzzing/FuzzStunClient.c 1
apps/common/stun_buffer.c 4
client/ns_turn_msg.c 6

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
stun_set_binding_response /src/coturn/src/apps/common/stun_buffer.c 5 ['struct._stun_buffer *', 'struct.stun_tid *', 'union.ioa_addr *', 'int ', 'char *'] 7 0 36 3 2 39 0 159 142
encode_oauth_token /src/coturn/src/client/ns_turn_msg.c 5 ['char *', 'struct._encoded_oauth_token *', 'struct._oauth_key *', 'struct._oauth_token *', 'char *'] 2 0 94 20 5 22 0 75 62
stun_get_message_len_str /src/coturn/src/client/ns_turn_msg.c 4 ['char *', 'size_t ', 'int ', 'size_t *'] 3 0 290 51 20 9 0 60 54
convert_oauth_key_data /src/coturn/src/client/ns_turn_msg.c 4 ['struct._oauth_key_data *', 'struct._oauth_key *', 'char *', 'size_t '] 0 0 359 47 17 10 0 57 51
make_ioa_addr_from_full_string /src/coturn/src/client/ns_turn_ioaddr.c 3 ['char *', 'int ', 'union.ioa_addr *'] 1 0 78 12 5 13 0 57 47
stun_attr_get_first_addr /src/coturn/src/apps/common/stun_buffer.c 4 ['struct._stun_buffer *', 'N/A', 'union.ioa_addr *', 'union.ioa_addr *'] 4 0 33 3 2 23 0 107 47

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

Functions statically reachable by fuzzers
43.3%
84/194
Cyclomatic complexity statically reachable by fuzzers
50.0%
481 / 962

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