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/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 57 58.7%
gold [1:9] 20 20.6%
yellow [10:29] 7 7.21%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 13 13.4%
All colors 97 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
40 45 status_stage_xact call site: 00045 process_get_descriptor
6 34 process_control_request call site: 00034 tud_control_xfer
2 14 tu_fifo_write call site: 00014 tud_event_hook_cb
2 27 usbd_reset call site: 00027 usbd_reset
2 94 tud_task_ext call site: 00094 tud_resume_cb
1 10 dcd_int_handler call site: 00010 tu_fifo_write
1 24 tu_fifo_read call site: 00024 usbd_reset
1 43 usbd_edpt_xfer call site: 00043 status_stage_xact
1 87 tud_task_ext call site: 00087 usbd_control_xfer_cb
1 92 usbd_control_xfer_cb call site: 00092 data_stage_xact

Runtime coverage analysis

Covered functions
101
Functions that are reachable but not covered
23
Reachable functions
59
Percentage of reachable functions covered
61.02%
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/device/usbd.c 21
/src/tinyusb/src/common/tusb_fifo.c 8
/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
/src/tinyusb/src/tusb.c 1

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 78 49.3%
gold [1:9] 20 12.6%
yellow [10:29] 19 12.0%
greenyellow [30:49] 6 3.79%
lawngreen 50+ 35 22.1%
All colors 158 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
40 45 status_stage_xact call site: 00045 process_get_descriptor
6 34 process_control_request call site: 00034 tud_control_xfer
6 149 cdc_task call site: 00149 tud_cdc_n_write_flush
3 94 tud_task_ext call site: 00094 cdc_task
3 114 tu_edpt_stream_read call site: 00114 usbd_edpt_xfer
3 121 tu_edpt_stream_read_xfer call site: 00121 tud_cdc_n_read
2 14 tu_fifo_write call site: 00014 tud_event_hook_cb
2 27 usbd_reset call site: 00027 usbd_reset
2 104 cdc_task call site: 00104 tud_cdc_n_available
2 132 tud_cdc_n_write call site: 00132 usbd_edpt_xfer
1 10 dcd_int_handler call site: 00010 tu_fifo_write
1 18 dcd_int_handler call site: 00018 tud_task_ext

Runtime coverage analysis

Covered functions
101
Functions that are reachable but not covered
30
Reachable functions
94
Percentage of reachable functions covered
68.09%
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/cdc/src/fuzz.cc 2
/src/tinyusb/test/fuzz/fuzz.cc 1
/src/tinyusb/src/device/usbd.c 26
/src/tinyusb/src/common/tusb_fifo.c 18
/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/tusb.c 8
/src/tinyusb/src/class/cdc/cdc_device.c 12

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 69 64.4%
gold [1:9] 19 17.7%
yellow [10:29] 7 6.54%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 12 11.2%
All colors 107 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
40 45 status_stage_xact call site: 00045 process_get_descriptor
12 94 tud_task_ext call site: 00094 net_task
6 34 process_control_request call site: 00034 tud_control_xfer
2 14 tu_fifo_write call site: 00014 tud_event_hook_cb
2 27 usbd_reset call site: 00027 usbd_reset
1 7 tud_rhport_init call site: 00007 dcd_int_handler
1 10 dcd_int_handler call site: 00010 tu_fifo_write
1 18 dcd_int_handler call site: 00018 tud_task_ext
1 24 tu_fifo_read call site: 00024 usbd_reset
1 43 usbd_edpt_xfer call site: 00043 status_stage_xact
1 87 tud_task_ext call site: 00087 usbd_control_xfer_cb
1 92 usbd_control_xfer_cb call site: 00092 data_stage_xact

Runtime coverage analysis

Covered functions
101
Functions that are reachable but not covered
29
Reachable functions
65
Percentage of reachable functions covered
55.38%
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/device/usbd.c 21
/src/tinyusb/src/common/tusb_fifo.c 8
/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/tusb.c 1
/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 37 0 233 168
netd_control_xfer_cb /src/tinyusb/src/class/net/ecm_rndis_device.c 3 ['char', 'char', 'N/A'] 7 0 266 63 24 21 0 161 118
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
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
cdcd_xfer_cb /src/tinyusb/src/class/cdc/cdc_device.c 4 ['char', 'char', 'int', 'int'] 5 0 234 54 21 23 0 129 38

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

Functions statically reachable by fuzzers
66.0%
344 / 522
Cyclomatic complexity statically reachable by fuzzers
76.0%
2376 / 3141

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

Directories in report

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