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: gdbm_fuzzer

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 433 73.6%
gold [1:9] 2 0.34%
yellow [10:29] 0 0.0%
greenyellow [30:49] 1 0.17%
lawngreen 50+ 152 25.8%
All colors 588 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
81 162 estrdup call site: 00162 estrdup
62 389 variable_has_errno call site: 00389 run_command
42 519 gdbm_file_sync call site: 00519 gdbm_set_errno
31 128 command_lookup call site: 00128 command_lookup
26 336 pager_write call site: 00336 format_arg
22 473 variable_unset call site: 00473 yysyntax_error
21 48 gdbmshell_run call site: 00048 yy_create_buffer
20 452 gdbm_error_is_masked call site: 00452 lerror
13 281 param_push_arg call site: 00281 gdbmarg_string
12 114 yylex call site: 00114 command_lookup
11 26 dsegm_new call site: 00026 ealloc_die
8 92 ecalloc call site: 00092 file_name_alloc

Runtime coverage analysis

Covered functions
278
Functions that are reachable but not covered
86
Reachable functions
192
Percentage of reachable functions covered
55.21%
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
fuzz/gdbm_fuzzer.c 1
tools/var.c 9
tools/gdbmshell.c 36
tools/datconv.c 6
tools/mem.c 6
tools/err.c 3
tools/lex.l 24
tools/./gdbmtool.h 7
tools/gram.y 3
tools/lex.c 19
tools/gram.c 5
tools/pagerfile.c 10
src/gdbmerrno.c 6
src/gdbmclose.c 1
src/gdbmsync.c 2
src/mmap.c 2
src/./proto.h 2
src/lock.c 1
src/bucket.c 4

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
import_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 16 0 241 34 10 210 0 1524 1284
export_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 14 0 159 22 7 105 0 639 181
recover_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 14 0 399 58 21 183 0 1307 145
help_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 10 0 147 18 6 64 0 228 132
collisions_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 11 0 104 21 8 110 0 535 61
snapshot_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 12 0 129 15 6 144 0 872 57
gdbm_failure_atomic /src/gdbm/src/gdbmsync.c 3 ['N/A', 'N/A', 'N/A'] 3 0 475 102 27 15 0 108 38

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

Functions statically reachable by fuzzers
61.0%
333 / 546
Cyclomatic complexity statically reachable by fuzzers
74.0%
2597 / 3496

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/gdbm/src/gdbmcount.c [] []
/src/gdbm/src/gdbmsetopt.c [] []
/src/gdbm/tools/util.c [] []
/src/gdbm/tools/./gdbmtool.h ['gdbm_fuzzer'] []
/src/gdbm/src/recover.c [] []
/src/gdbm/src/gdbmseq.c [] []
/src/gdbm/tools/gram.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/gdbmerrno.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/falloc.c [] []
/src/gdbm/src/gdbmload.c [] []
/src/gdbm/src/./proto.h ['gdbm_fuzzer'] []
/src/gdbm/tools/lex.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/hash.c [] []
/src/gdbm/src/lock.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/base64.c [] []
/src/gdbm/src/fullio.c [] []
/src/gdbm/tools/input-file.c [] []
/src/gdbm/src/gdbmsync.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/version.c [] []
/src/gdbm/src/findkey.c [] []
/src/gdbm/src/avail.c [] []
/src/gdbm/tools/lex.l ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/tools/err.c ['gdbm_fuzzer'] []
/src/gdbm/tools/progname.c [] []
/src/gdbm/src/gdbmdelete.c [] []
/src/gdbm/src/gdbmopen.c [] []
/src/gdbm/src/gdbmreorg.c [] []
/src/gdbm/tools/gram.y ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/tools/gdbmshell.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/tools/input-null.c [] []
/src/gdbm/tools/wordwrap.c [] []
/src/gdbm/src/gdbmexp.c [] []
/src/gdbm/src/debug.c [] []
/src/gdbm/tools/mem.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/gdbmfdesc.c [] []
/src/gdbm/src/gdbmfetch.c [] []
/src/gdbm/src/./gdbmdefs.h [] []
/src/gdbm/src/gdbmclose.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/gdbmdump.c [] []
/src/gdbm/tools/var.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/tools/pagerfile.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/mmap.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/bucket.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/update.c [] []
/src/gdbm/src/gdbmstore.c [] []
/src/gdbm/tools/datconv.c ['gdbm_fuzzer'] ['gdbm_fuzzer']
/src/gdbm/src/gdbmimp.c [] []
/src/gdbm/fuzz/gdbm_fuzzer.c ['gdbm_fuzzer'] ['gdbm_fuzzer']

Directories in report

Directory
/src/gdbm/src/./
/src/gdbm/tools/./
/src/gdbm/tools/
/src/gdbm/fuzz/
/src/gdbm/src/