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 277 97.5%
gold [1:9] 6 2.11%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 1 0.35%
All colors 284 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
210 73 mg_poll call site: 00073 mg_get_response
51 12 mg_vsnprintf call site: 00012 connect_socket
7 64 set_close_on_exec call site: 00064 mg_cry_internal_wrap
6 0 EP call site: 00000 test_civetweb_client
3 7 mg_calloc call site: 00007 mg_snprintf

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 237 83.4%
gold [1:9] 33 11.6%
yellow [10:29] 12 4.22%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 2 0.70%
All colors 284 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
48 235 get_message call site: 00235 mg_read
38 73 mg_poll call site: 00073 sslize
34 112 mg_strcasecmp call site: 00112 mg_close_connection
25 30 sockaddr_to_string call site: 00030 connect_socket
17 12 mg_vsnprintf call site: 00012 mg_cry_internal_wrap
7 64 set_close_on_exec call site: 00064 mg_cry_internal_wrap
7 156 close_socket_gracefully call site: 00156 mg_cry_internal_wrap
7 166 mg_unlock_connection call site: 00166 mg_connect_client
6 0 EP call site: 00000 test_civetweb_client
6 57 set_non_blocking_mode call site: 00057 set_close_on_exec
6 176 alloc_vprintf call site: 00176 alloc_vprintf2
6 197 push_inner call site: 00197 push_all

Runtime coverage analysis

Covered functions
96
Functions that are reachable but not covered
79
Reachable functions
112
Percentage of reachable functions covered
29.46%
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 206 80.1%
gold [1:9] 2 0.77%
yellow [10:29] 3 1.16%
greenyellow [30:49] 28 10.8%
lawngreen 50+ 18 7.00%
All colors 257 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
38 72 mg_poll call site: 00072 sslize
33 111 mg_strcasecmp call site: 00111 mg_printf
25 29 sockaddr_to_string call site: 00029 connect_socket
17 11 mg_vsnprintf call site: 00011 mg_cry_internal_wrap
17 217 skip_to_end_of_word_and_terminate call site: 00217 mg_close_connection
8 206 get_message call site: 00206 mg_snprintf
7 63 set_close_on_exec call site: 00063 mg_cry_internal_wrap
7 244 close_socket_gracefully call site: 00244 mg_cry_internal_wrap
6 56 set_non_blocking_mode call site: 00056 set_close_on_exec
6 147 alloc_vprintf call site: 00147 alloc_vprintf2
6 168 push_inner call site: 00168 push_all
6 175 mg_write call site: 00175 mg_get_response

Runtime coverage analysis

Covered functions
98
Functions that are reachable but not covered
73
Reachable functions
107
Percentage of reachable functions covered
31.78%
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

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 18 3 2 370 0 2435 1908
mg_handle_form_request /src/civetweb/src/handle_form.inl 2 ['N/A', 'N/A'] 6 0 2386 398 146 63 0 487 179
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 33 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 84 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%
2572 / 2799

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 394 101 25.63% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
mg_vsnprintf 32 17 53.12% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
init_ssl_ctx 74 13 17.56% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
set_ports_option 175 72 41.14% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
parse_port_string 94 38 40.42% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
set_uid_option 38 13 34.21% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
mg_get_response_code_text 154 6 3.896% ['civetweb_fuzz3', 'civetweb_fuzz2']
mg_write 62 20 32.25% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
mg_send_http_error_impl 129 54 41.86% ['civetweb_fuzz3', 'civetweb_fuzz2']
pull_inner 110 41 37.27% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
send_cors_header 56 30 53.57% ['civetweb_fuzz3', 'civetweb_fuzz2']
push_inner 96 29 30.20% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
close_socket_gracefully 53 19 35.84% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
get_message 64 28 43.75% ['civetweb_fuzz3', 'civetweb_fuzz1', 'civetweb_fuzz2']
worker_thread_run 107 57 53.27% ['civetweb_fuzz3', 'civetweb_fuzz2']
process_new_connection 121 43 35.53% ['civetweb_fuzz3', 'civetweb_fuzz2']
get_request 67 18 26.86% ['civetweb_fuzz3', 'civetweb_fuzz2']
mg_response_header_add 44 23 52.27% ['civetweb_fuzz3', 'civetweb_fuzz2']