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: /src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc

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 92 61.7%
gold [1:9] 17 11.4%
yellow [10:29] 3 2.01%
greenyellow [30:49] 7 4.69%
lawngreen 50+ 30 20.1%
All colors 149 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
54 42 usbd_edpt_xfer call site: 00042 cdc_task
13 28 tud_task_ext call site: 00028 process_control_request
9 113 tu_edpt_stream_read_xfer call site: 00113 tud_cdc_n_read
4 142 cdc_task call site: 00142 tud_cdc_n_write_flush
3 136 tu_edpt_stream_write_xfer call site: 00136 stream_xfer
2 13 tu_fifo_write call site: 00013 tud_event_hook_cb
2 108 tu_fifo_read_n_access_mode call site: 00108 ff_pull_n
1 8 tud_rhport_init call site: 00008 dcd_int_handler
1 11 dcd_int_handler call site: 00011 tu_fifo_write
1 17 dcd_int_handler call site: 00017 tud_task_ext
1 21 tu_fifo_read call site: 00021 correct_read_index
1 100 tud_cdc_n_connected call site: 00100 tud_cdc_n_get_line_state

Runtime coverage analysis

Covered functions
90
Functions that are reachable but not covered
47
Reachable functions
92
Percentage of reachable functions covered
48.91%
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
/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc 2
/src/tinyusb/test/fuzz/fuzz.cc 1
/src/tinyusb/src/tusb.c 12
/src/tinyusb/src/device/usbd.c 26
/src/tinyusb/src/common/tusb_fifo.c 12
/src/tinyusb/test/fuzz/dcd_fuzz.cc 9
/src/tinyusb/src/device/usbd_control.c 9
/src/tinyusb/test/fuzz/usbd_fuzz.cc 4
/src/tinyusb/test/fuzz/device/cdc/src/usb_descriptors.cc 3
/src/tinyusb/src/class/cdc/cdc_device.c 12

Fuzzer: /src/tinyusb/test/fuzz/device/msc/src/fuzz.cc

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 70 72.9%
gold [1:9] 11 11.4%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 15 15.6%
All colors 96 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
53 42 usbd_edpt_xfer call site: 00042 process_get_descriptor
13 28 tud_task_ext call site: 00028 process_control_request
2 13 tu_fifo_write call site: 00013 tud_event_hook_cb
1 11 dcd_int_handler call site: 00011 tu_fifo_write
1 21 tu_fifo_read call site: 00021 correct_read_index

Runtime coverage analysis

Covered functions
90
Functions that are reachable but not covered
35
Reachable functions
58
Percentage of reachable functions covered
39.66%
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
/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc 1
/src/tinyusb/test/fuzz/fuzz.cc 1
/src/tinyusb/src/tusb.c 2
/src/tinyusb/src/device/usbd.c 21
/src/tinyusb/src/common/tusb_fifo.c 6
/src/tinyusb/test/fuzz/dcd_fuzz.cc 9
/src/tinyusb/src/device/usbd_control.c 9
/src/tinyusb/test/fuzz/usbd_fuzz.cc 4
/src/tinyusb/test/fuzz/device/msc/src/usb_descriptors.cc 3

Fuzzer: /src/tinyusb/test/fuzz/device/net/src/fuzz.cc

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 78 73.5%
gold [1:9] 11 10.3%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 17 16.0%
All colors 106 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
54 42 usbd_edpt_xfer call site: 00042 process_get_descriptor
13 28 tud_task_ext call site: 00028 process_control_request
4 101 net_task call site: 00101 do_in_xfer
2 13 tu_fifo_write call site: 00013 tud_event_hook_cb
1 0 EP call site: 00000 fuzz_init
1 8 tud_rhport_init call site: 00008 dcd_int_handler
1 11 dcd_int_handler call site: 00011 tu_fifo_write
1 17 dcd_int_handler call site: 00017 tud_task_ext
1 21 tu_fifo_read call site: 00021 correct_read_index

Runtime coverage analysis

Covered functions
90
Functions that are reachable but not covered
37
Reachable functions
64
Percentage of reachable functions covered
42.19%
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
/src/tinyusb/test/fuzz/device/net/src/fuzz.cc 2
/src/tinyusb/test/fuzz/fuzz.cc 1
/src/tinyusb/src/tusb.c 2
/src/tinyusb/src/device/usbd.c 21
/src/tinyusb/src/common/tusb_fifo.c 6
/src/tinyusb/test/fuzz/dcd_fuzz.cc 9
/src/tinyusb/src/device/usbd_control.c 9
/src/tinyusb/test/fuzz/usbd_fuzz.cc 4
/src/tinyusb/test/fuzz/device/net/src/usb_descriptors.cc 3
/src/tinyusb/src/class/net/ecm_rndis_device.c 4
/src/tinyusb/test/fuzz/net_fuzz.cc 1

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
netif_input /src/tinyusb/lib/lwip/src/core/netif.c 2 ['N/A', 'N/A'] 11 0 28 6 3 133 0 1138 1138
httpd_init_pcb /src/tinyusb/lib/lwip/src/apps/http/httpd.c 1 ['N/A'] 22 0 25 6 3 125 1 781 258
mscd_xfer_cb /src/tinyusb/src/class/msc/msc_device.c 4 ['char', 'char', 'int', 'int'] 6 0 387 92 34 35 0 230 168
netd_control_xfer_cb /src/tinyusb/src/class/net/ecm_rndis_device.c 3 ['char', 'char', 'N/A'] 7 0 266 63 24 20 0 151 108
dhserv_init /src/tinyusb/lib/networking/dhserver.c 1 ['N/A'] 9 0 40 8 4 49 0 272 95
netif_add_noaddr /src/tinyusb/lib/lwip/src/core/netif.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 18 0 12 3 2 68 0 363 60
cdcd_xfer_cb /src/tinyusb/src/class/cdc/cdc_device.c 4 ['char', 'char', 'int', 'int'] 4 0 282 64 25 25 0 142 48
etharp_output /src/tinyusb/lib/lwip/src/core/ipv4/etharp.c 3 ['N/A', 'N/A', 'N/A'] 9 0 161 29 12 32 0 208 41

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

Functions statically reachable by fuzzers
66.0%
342 / 518
Cyclomatic complexity statically reachable by fuzzers
76.0%
2374 / 3120

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

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/tinyusb/src/class/cdc/cdc_device.c ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc']
/src/tinyusb/test/fuzz/net_fuzz.cc ['/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] []
/src/tinyusb/lib/networking/dhserver.c [] []
/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc ['/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc']
/src/tinyusb/src/device/usbd_control.c ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/lib/lwip/src/core/ipv4/ip4_addr.c [] []
/src/tinyusb/lib/lwip/src/apps/http/fs.c [] []
/src/tinyusb/lib/lwip/src/core/pbuf.c [] []
/src/tinyusb/lib/lwip/src/core/stats.c [] []
/src/tinyusb/lib/lwip/src/core/ipv4/icmp.c [] []
/src/tinyusb/lib/lwip/src/netif/slipif.c [] []
/src/tinyusb/src/device/usbd.c ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/lib/lwip/src/core/timeouts.c [] []
/src/tinyusb/lib/lwip/src/core/ipv4/ip4_frag.c [] []
/src/tinyusb/lib/lwip/src/core/tcp_out.c [] []
/src/tinyusb/lib/lwip/src/apps/http/httpd.c [] []
/src/tinyusb/test/fuzz/usbd_fuzz.cc ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/test/fuzz/msc_fuzz.cc [] []
/src/tinyusb/lib/lwip/src/core/ipv4/ip4.c [] []
/src/tinyusb/lib/lwip/src/core/tcp_in.c [] []
/src/tinyusb/lib/lwip/src/core/ipv4/etharp.c [] []
/src/tinyusb/src/class/net/ecm_rndis_device.c ['/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/lib/lwip/src/core/memp.c [] []
/src/tinyusb/test/fuzz/fuzz.cc ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/tinyusb/test/fuzz/dcd_fuzz.cc ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/lib/lwip/src/core/inet_chksum.c [] []
/src/tinyusb/test/fuzz/device/net/src/usb_descriptors.cc ['/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] []
/src/tinyusb/lib/lwip/src/core/tcp.c [] []
/src/tinyusb/lib/lwip/src/core/init.c [] []
/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc']
/src/tinyusb/lib/networking/dnserver.c [] []
/src/tinyusb/lib/lwip/src/core/mem.c [] []
/src/tinyusb/test/fuzz/device/cdc/src/usb_descriptors.cc ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc'] []
/src/tinyusb/lib/lwip/src/netif/ethernet.c [] []
/src/tinyusb/src/class/msc/msc_device.c [] []
/src/tinyusb/src/common/tusb_fifo.c ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/lib/lwip/src/core/netif.c [] []
/src/tinyusb/lib/lwip/src/core/udp.c [] []
/src/tinyusb/src/tusb.c ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/cdc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc', '/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/lib/networking/rndis_reports.c [] []
/src/tinyusb/lib/lwip/src/core/def.c [] []
/src/tinyusb/test/fuzz/device/net/src/fuzz.cc ['/src/tinyusb/test/fuzz/device/net/src/fuzz.cc'] ['/src/tinyusb/test/fuzz/device/net/src/fuzz.cc']
/src/tinyusb/test/fuzz/device/msc/src/usb_descriptors.cc ['/src/tinyusb/test/fuzz/device/msc/src/fuzz.cc'] []
/usr/local/bin/../include/c++/v1/optional [] []

Directories in report

Directory
/src/tinyusb/test/fuzz/device/net/src/
/src/tinyusb/src/device/
/src/tinyusb/lib/lwip/src/apps/http/
/src/tinyusb/lib/lwip/src/core/ipv4/
/src/tinyusb/lib/lwip/src/core/
/src/tinyusb/src/class/msc/
/src/tinyusb/src/class/cdc/
/src/tinyusb/src/
/usr/local/bin/../include/c++/v1/
/src/tinyusb/test/fuzz/
/src/tinyusb/src/class/net/
/src/tinyusb/test/fuzz/device/msc/src/
/src/tinyusb/test/fuzz/device/cdc/src/
/src/tinyusb/lib/networking/
/src/tinyusb/lib/lwip/src/netif/
/src/tinyusb/src/common/