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: civetweb_fuzz1

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 276 97.1%
gold [1:9] 7 2.46%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 1 0.35%
All colors 284 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
207 207 6 :

['__errno_location', 'setgid', 'strerror', 'mg_cry_internal_wrap', 'setgroups', 'setuid']

207 207 set_uid_option call site: 00000 /src/civetweb/src/civetweb.c:16677
106 106 1 :

['initialize_openssl']

106 110 mg_init_library call site: 00000 /src/civetweb/src/civetweb.c:23129
63 63 1 :

['mg_cry_internal_wrap']

63 63 mg_vsnprintf call site: 00012 /src/civetweb/src/civetweb.c:3195
4 4 2 :

['pthread_mutexattr_destroy', 'pthread_key_delete']

6 10 mg_init_library call site: 00000 /src/civetweb/src/civetweb.c:23074
4 4 2 :

['strchr', 'strlen']

6 6 next_option call site: 00000 /src/civetweb/src/civetweb.c:4003
2 2 1 :

['htonl']

4 6 parse_port_string call site: 00000 /src/civetweb/src/civetweb.c:15862
2 2 1 :

['abort']

2 2 civetweb_init call site: 00000 /src/civetweb/fuzztest/fuzzmain.c:92
2 2 1 :

['memchr']

2 2 next_option call site: 00000 /src/civetweb/src/civetweb.c:4008
0 8 1 :

['close_all_listening_sockets']

0 8 set_ports_option call site: 00000 /src/civetweb/src/civetweb.c:16428
0 0 None 3181 4497 mg_start2 call site: 00000 /src/civetweb/src/civetweb.c:21137
0 0 None 3104 4146 mg_start2 call site: 00000 /src/civetweb/src/civetweb.c:21214
0 0 None 3104 4146 mg_start2 call site: 00000 /src/civetweb/src/civetweb.c:21292

Runtime coverage analysis

Covered functions
47
Functions that are reachable but not covered
103
Reachable functions
112
Percentage of reachable functions covered
8.04%
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
fuzztest/fuzzmain.c 3
src/civetweb.c 60

Fuzzer: civetweb_fuzz3

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 159 61.8%
gold [1:9] 8 3.11%
yellow [10:29] 79 30.7%
greenyellow [30:49] 3 1.16%
lawngreen 50+ 8 3.11%
All colors 257 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
239 245 5 :

['mg_free', 'sslize', 'ssl_error', 'close', 'ssl_use_pem_file']

239 245 mg_connect_client_impl call site: 00093 /src/civetweb/src/civetweb.c:18605
65 65 2 :

['strerror', 'mg_cry_internal_wrap']

312 320 mg_connect_client_impl call site: 00085 /src/civetweb/src/civetweb.c:18576
63 63 1 :

['mg_cry_internal_wrap']

63 63 mg_vsnprintf call site: 00011 /src/civetweb/src/civetweb.c:3195
14 38 7 :

['send', 'ferror', '__errno_location', 'fwrite', 'mg_get_current_time_ns', 'mg_poll', 'usleep']

14 38 push_inner call site: 00168 /src/civetweb/src/civetweb.c:6232
11 11 1 :

['alloc_vprintf2']

11 11 alloc_vprintf call site: 00147 /src/civetweb/src/civetweb.c:7178
8 8 4 :

['strerror', '__errno_location', 'abort', 'close']

8 8 mock_server_init call site: 00000 /src/civetweb/fuzztest/fuzzmain.c:435
6 6 2 :

['sleep', 'time']

6 154 mg_write call site: 00155 /src/civetweb/src/civetweb.c:7019
6 6 3 :

['strerror', '__errno_location', 'close']

6 6 connect_socket call site: 00075 /src/civetweb/src/civetweb.c:9864
4 4 2 :

['fileno', 'read']

6 6 pull_inner call site: 00192 /src/civetweb/src/civetweb.c:6364
2 2 1 :

['atoi']

142 142 close_socket_gracefully call site: 00242 /src/civetweb/src/civetweb.c:18209
2 2 1 :

['strtod']

6 100 read_message call site: 00188 /src/civetweb/src/civetweb.c:11445
2 2 1 :

['atoi']

4 64 push_all call site: 00157 /src/civetweb/src/civetweb.c:6311

Runtime coverage analysis

Covered functions
46
Functions that are reachable but not covered
65
Reachable functions
107
Percentage of reachable functions covered
39.25%
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
fuzztest/fuzzmain.c 2
src/civetweb.c 57

Fuzzer: civetweb_fuzz2

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 175 61.6%
gold [1:9] 81 28.5%
yellow [10:29] 22 7.74%
greenyellow [30:49] 2 0.70%
lawngreen 50+ 4 1.40%
All colors 284 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
239 245 5 :

['mg_free', 'sslize', 'ssl_error', 'close', 'ssl_use_pem_file']

239 245 mg_connect_client_impl call site: 00094 /src/civetweb/src/civetweb.c:18605
207 207 6 :

['__errno_location', 'setgid', 'strerror', 'mg_cry_internal_wrap', 'setgroups', 'setuid']

207 207 set_uid_option call site: 00000 /src/civetweb/src/civetweb.c:16677
106 106 1 :

['initialize_openssl']

106 110 mg_init_library call site: 00000 /src/civetweb/src/civetweb.c:23129
65 65 2 :

['strerror', 'mg_cry_internal_wrap']

312 320 mg_connect_client_impl call site: 00086 /src/civetweb/src/civetweb.c:18576
63 63 1 :

['mg_cry_internal_wrap']

63 65 worker_thread_run call site: 00000 /src/civetweb/src/civetweb.c:20260
63 63 1 :

['mg_cry_internal_wrap']

63 63 mg_vsnprintf call site: 00012 /src/civetweb/src/civetweb.c:3195
16 36 4 :

['mg_unlock_context', 'mg_strncasecmp', 'strlen', 'mg_lock_context']

16 36 switch_domain_context call site: 00000 /src/civetweb/src/civetweb.c:14501
14 38 7 :

['send', 'ferror', '__errno_location', 'fwrite', 'mg_get_current_time_ns', 'mg_poll', 'usleep']

14 38 push_inner call site: 00197 /src/civetweb/src/civetweb.c:6232
14 14 2 :

['strchr', 'mg_stat']

915 1626 mg_send_http_error_impl call site: 00000 /src/civetweb/src/civetweb.c:4555
11 11 1 :

['alloc_vprintf2']

11 11 alloc_vprintf call site: 00176 /src/civetweb/src/civetweb.c:7178
6 6 2 :

['sleep', 'time']

6 154 mg_write call site: 00184 /src/civetweb/src/civetweb.c:7019
6 6 3 :

['strerror', '__errno_location', 'close']

6 6 connect_socket call site: 00076 /src/civetweb/src/civetweb.c:9864

Runtime coverage analysis

Covered functions
117
Functions that are reachable but not covered
64
Reachable functions
112
Percentage of reachable functions covered
42.86%
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
fuzztest/fuzzmain.c 3
src/civetweb.c 60

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
LLVMFuzzerInitialize /src/civetweb/fuzztest/fuzzmain.c 2 ['N/A', 'N/A'] 20 0 20 3 2 369 0 2416 1889
mg_handle_form_request /src/civetweb/src/handle_form.inl 2 ['N/A', 'N/A'] 6 0 2393 391 143 63 0 480 173
mg_set_websocket_handler /src/civetweb/src/civetweb.c 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 7 0 40 3 2 36 0 148 51
mg_modify_passwords_file /src/civetweb/src/civetweb.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 89 16 7 24 0 106 49

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

Functions statically reachable by fuzzers
86.0%
260 / 303
Cyclomatic complexity statically reachable by fuzzers
92.0%
2549 / 2776

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

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
mg_start2 395 102 25.82% ['civetweb_fuzz2', 'civetweb_fuzz1']
mg_vsnprintf 33 17 51.51% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
init_ssl_ctx 74 13 17.56% ['civetweb_fuzz2', 'civetweb_fuzz1']
set_ports_option 175 72 41.14% ['civetweb_fuzz2', 'civetweb_fuzz1']
parse_port_string 94 39 41.48% ['civetweb_fuzz2', 'civetweb_fuzz1']
set_uid_option 38 13 34.21% ['civetweb_fuzz2', 'civetweb_fuzz1']
mg_write 62 20 32.25% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
pull_inner 110 35 31.81% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
push_inner 96 27 28.12% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
close_socket_gracefully 53 19 35.84% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
mg_connect_client_impl 162 54 33.33% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
connect_socket 161 57 35.40% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
get_message 64 28 43.75% ['civetweb_fuzz2', 'civetweb_fuzz3', 'civetweb_fuzz1']
test_civetweb_client 63 26 41.26% ['civetweb_fuzz2', 'civetweb_fuzz1']
mg_get_response_code_text 154 6 3.896% ['civetweb_fuzz2']
mg_read 103 6 5.825% ['civetweb_fuzz2', 'civetweb_fuzz1']
mg_send_http_error_impl 129 55 42.63% ['civetweb_fuzz2']
worker_thread_run 107 57 53.27% ['civetweb_fuzz2']
process_new_connection 121 62 51.23% ['civetweb_fuzz2']
get_request 67 31 46.26% ['civetweb_fuzz2']
switch_domain_context 43 9 20.93% ['civetweb_fuzz2']
get_uri_type 38 18 47.36% ['civetweb_fuzz2']
mg_response_header_add 44 23 52.27% ['civetweb_fuzz2']