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

Fuzzer details

Fuzzer: fuzz

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 419 89.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 51 10.8%
All colors 470 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
196 125 LLVMFuzzerTestOneInput call site: 00125 mg_vxprintf
89 375 fn(mg_connection*, int, void*) call site: 00375 mg_http_serve_file
51 322 LLVMFuzzerTestOneInput call site: 00322 mg_connect
22 13 LLVMFuzzerTestOneInput call site: 00013 mg_http_get_header
11 43 LLVMFuzzerTestOneInput call site: 00043 mg_url_decode
10 1 LLVMFuzzerTestOneInput call site: 00001 mg_dns_parse_rr
10 113 LLVMFuzzerTestOneInput call site: 00113 mg_random
9 95 LLVMFuzzerTestOneInput call site: 00095 memcmp
7 82 LLVMFuzzerTestOneInput call site: 00082 mg_base64_final
4 70 LLVMFuzzerTestOneInput call site: 00070 mg_ntohl
4 76 LLVMFuzzerTestOneInput call site: 00076
3 109 LLVMFuzzerTestOneInput call site: 00109 epoll_create1

Runtime coverage analysis

Covered functions
147
Functions that are reachable but not covered
73
Reachable functions
270
Percentage of reachable functions covered
72.96%
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
test/fuzz.c 2
src/dns.c 7
src/util.c 7
src/http.c 28
src/str.c 4
src/mqtt.c 2
src/sntp.c 2
src/base64.c 6
src/json.c 5
src/net.c 11
src/tls_dummy.c 4
src/net_builtin.c 34
src/event.c 2
src/printf.c 6
src/fmt.c 8
src/iobuf.c 3
src/log.c 4
src/url.c 3
src/ssi.c 1
src/fs.c 2

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
http_cb(mg_connection*,int,void*) /src/mongoose/src/http.c 3 ['N/A', 'int', 'N/A'] 15 0 726 102 37 73 0 495 66
mg_mqtt_connect /src/mongoose/src/mqtt.c 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 11 0 64 9 4 108 0 441 50
mg_tls_x25519 /src/mongoose/src/tls_x25519.c 4 ['N/A', 'N/A', 'N/A', 'int'] 7 0 204 18 6 30 0 49 49
mg_ws_cb(mg_connection*,int,void*) /src/mongoose/src/ws.c 3 ['N/A', 'int', 'N/A'] 8 0 372 51 14 88 0 409 48
mg_http_next_multipart /src/mongoose/src/http.c 4 ['N/A', 'size_t', 'size_t', 'N/A'] 3 0 470 59 23 7 0 54 41
mg_rpc_process /src/mongoose/src/rpc.c 1 ['N/A'] 16 0 149 15 6 53 0 366 38
mg_json_next /src/mongoose/src/json.c 5 ['N/A', 'size_t', 'size_t', 'N/A', 'N/A'] 4 0 604 93 35 12 0 176 35

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

Functions statically reachable by fuzzers
57.9%
217 / 374
Cyclomatic complexity statically reachable by fuzzers
74.0%
1754 / 2363

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

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
/src/mongoose/src/ssi.c ['fuzz'] []
/src/mongoose/src/fs.c ['fuzz'] ['fuzz']
/src/mongoose/src/dns.c ['fuzz'] ['fuzz']
/src/mongoose/src/sntp.c ['fuzz'] ['fuzz']
/src/mongoose/src/base64.c ['fuzz'] ['fuzz']
/src/mongoose/src/net.c ['fuzz'] ['fuzz']
/src/mongoose/src/util.c ['fuzz'] ['fuzz']
/src/mongoose/src/fs_packed.c [] []
/src/mongoose/src/net_builtin.c ['fuzz'] ['fuzz']
/src/mongoose/src/http.c ['fuzz'] ['fuzz']
/src/mongoose/src/fmt.c ['fuzz'] ['fuzz']
/src/mongoose/src/str.c ['fuzz'] ['fuzz']
/src/mongoose/src/rpc.c [] []
/src/mongoose/src/sha256.c [] []
/src/mongoose/src/device_dummy.c [] []
/src/mongoose/src/mqtt.c ['fuzz'] ['fuzz']
/src/mongoose/test/driver_mock.c [] []
/src/mongoose/src/md5.c [] []
/src/mongoose/src/tls_dummy.c ['fuzz'] ['fuzz']
/src/mongoose/src/sha1.c [] []
/src/mongoose/src/iobuf.c ['fuzz'] ['fuzz']
/src/mongoose/src/drivers/phy.c [] []
/src/mongoose/src/log.c ['fuzz'] ['fuzz']
/src/mongoose/src/tls_x25519.c [] []
/src/mongoose/src/printf.c ['fuzz'] ['fuzz']
/src/mongoose/src/device_flash.c [] []
/src/mongoose/test/fuzz.c ['fuzz'] ['fuzz']
/src/mongoose/src/event.c ['fuzz'] ['fuzz']
/src/mongoose/src/ota_dummy.c [] []
/src/mongoose/src/json.c ['fuzz'] ['fuzz']
/src/mongoose/src/queue.c [] []
/src/mongoose/src/fs_posix.c [] []
/src/mongoose/src/ws.c [] []
/src/mongoose/src/timer.c [] []
/src/mongoose/src/url.c ['fuzz'] ['fuzz']

Directories in report

Directory
/src/mongoose/src/
/src/mongoose/test/
/src/mongoose/src/drivers/