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_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 162 63.0%
gold [1:9] 12 4.66%
yellow [10:29] 72 28.0%
greenyellow [30:49] 4 1.55%
lawngreen 50+ 7 2.72%
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
32 111 mg_strcasecmp call site: 00111 refresh_trust
27 11 mg_vsnprintf call site: 00011 mg_cry_internal_wrap
21 89 mg_connect_client_impl call site: 00089 sslize
9 75 connect_socket call site: 00075 mg_snprintf
7 244 close_socket_gracefully call site: 00244 mg_cry_internal_wrap
6 147 alloc_vprintf call site: 00147 alloc_vprintf2
6 168 push_inner call site: 00168 push_all
5 56 set_non_blocking_mode call site: 00056 mg_snprintf
5 161 push_inner call site: 00161 clock_gettime
5 192 read_message call site: 00192 mg_poll
4 49 connect_socket call site: 00049 mg_snprintf
4 63 set_close_on_exec call site: 00063 mg_cry_internal_wrap

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 180 63.3%
gold [1:9] 85 29.9%
yellow [10:29] 16 5.63%
greenyellow [30:49] 1 0.35%
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
30 112 mg_strcasecmp call site: 00112 refresh_trust
21 90 mg_connect_client_impl call site: 00090 sslize
17 12 mg_vsnprintf call site: 00012 mg_cry_internal_wrap
9 30 sockaddr_to_string call site: 00030 mg_cry_internal_impl
9 76 connect_socket call site: 00076 mg_snprintf
7 156 close_socket_gracefully call site: 00156 mg_cry_internal_wrap
7 271 pull_all call site: 00271 mg_read_inner
6 176 alloc_vprintf call site: 00176 alloc_vprintf2
6 197 push_inner call site: 00197 push_all
5 57 set_non_blocking_mode call site: 00057 mg_snprintf
5 190 push_inner call site: 00190 clock_gettime
5 221 read_message call site: 00221 mg_poll

Runtime coverage analysis

Covered functions
111
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.
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 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_fuzz1', 'civetweb_fuzz2']
mg_vsnprintf 32 17 53.12% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
init_ssl_ctx 74 13 17.56% ['civetweb_fuzz1', 'civetweb_fuzz2']
set_ports_option 175 72 41.14% ['civetweb_fuzz1', 'civetweb_fuzz2']
parse_port_string 94 38 40.42% ['civetweb_fuzz1', 'civetweb_fuzz2']
set_uid_option 38 13 34.21% ['civetweb_fuzz1', 'civetweb_fuzz2']
mg_write 62 20 32.25% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
pull_inner 110 35 31.81% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
push_inner 96 27 28.12% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
close_socket_gracefully 53 19 35.84% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
mg_connect_client_impl 162 53 32.71% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
connect_socket 161 57 35.40% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
get_message 64 28 43.75% ['civetweb_fuzz1', 'civetweb_fuzz2', 'civetweb_fuzz3']
test_civetweb_client 63 23 36.50% ['civetweb_fuzz1', 'civetweb_fuzz2']
mg_get_response_code_text 154 6 3.896% ['civetweb_fuzz2']
mg_read 103 6 5.825% ['civetweb_fuzz1', 'civetweb_fuzz2']
mg_send_http_error_impl 129 54 41.86% ['civetweb_fuzz2']
send_cors_header 56 30 53.57% ['civetweb_fuzz2']
worker_thread_run 107 57 53.27% ['civetweb_fuzz2']
process_new_connection 121 43 35.53% ['civetweb_fuzz2']
get_request 67 16 23.88% ['civetweb_fuzz2']
parse_http_request 50 17 34.0% ['civetweb_fuzz2']
mg_response_header_add 44 23 52.27% ['civetweb_fuzz2']