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_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] 14 5.44%
yellow [10:29] 72 28.0%
greenyellow [30:49] 5 1.94%
lawngreen 50+ 7 2.72%
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 :

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

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

['mg_cry_internal_wrap', 'strerror']

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 :

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

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 :

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

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 :

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

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

['read', 'fileno']

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

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

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

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

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

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
mg_start /src/civetweb/src/civetweb.c 3 ['N/A', 'N/A', 'N/A'] 18 0 33 3 2 361 1 2390 1865
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
84.0%
255 / 303
Cyclomatic complexity statically reachable by fuzzers
91.0%
2529 / 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