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 426 72.4%
gold [1:9] 2 0.34%
yellow [10:29] 0 0.0%
greenyellow [30:49] 1 0.17%
lawngreen 50+ 159 27.0%
All colors 588 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
748 748 3 :

['free', 'tildexpand', 'gdbm_open']

748 1160 opendb call site: 00000 /src/gdbm/tools/gdbmshell.c:141
298 298 2 :

['fputc', 'format_arg']

361 510 run_command call site: 00303 /src/gdbm/tools/gdbmshell.c:3246
236 236 1 :

['gdbm_avail_verify']

240 244 gdbm_open_ext call site: 00000 /src/gdbm/src/gdbmopen.c:745
236 236 3 :

['lerror', 'strcmp', 'strtoul']

236 1615 recover_handler call site: 00000 /src/gdbm/tools/gdbmshell.c:645
176 382 3 :

['cache_lru_free', 'cache_tab_lookup_slot', 'cache_tab_resize']

176 553 cache_lookup call site: 00000 /src/gdbm/src/bucket.c:319
63 63 1 :

['pager_create']

63 159 run_command call site: 00355 /src/gdbm/tools/gdbmshell.c:3266
56 164 8 :

['fsync', 'gdbm_set_errno', '_gdbmsync_done.1483', 'gdbm_errno_location', '_gdbmsync_init.1484', 'ioctl', '__errno_location', 'fchmod']

56 164 _gdbm_snapshot call site: 00519 /src/gdbm/src/gdbmsync.c:82
49 79 3 :

['pager_checklines', 'e2nrealloc', 'memccount']

49 79 pager_write call site: 00335 /src/gdbm/tools/pagerfile.c:70
46 46 1 :

['pager_checklines']

46 46 pager_vprintf call site: 00319 /src/gdbm/tools/pagerfile.c:151
44 44 5 :

['strcmp', 'strtok', 'terror', 'str2errcode', 'strlen']

44 44 errormask_sethook call site: 00000 /src/gdbm/tools/var.c:753
27 32 2 :

['lerror', 'interactive']

27 32 command_lookup call site: 00133 /src/gdbm/tools/gdbmshell.c:2692
27 27 1 :

['lerror']

27 27 dsconv call site: 00000 /src/gdbm/tools/datconv.c:390

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 250 34 10 208 0 1509 1271
export_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 14 0 166 22 7 104 0 636 178
recover_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 14 0 408 58 21 183 0 1307 145
help_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 10 0 153 18 6 64 0 228 132
collisions_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 11 0 110 21 8 110 0 535 61
snapshot_handler /src/gdbm/tools/gdbmshell.c 2 ['N/A', 'N/A'] 12 0 136 15 6 144 0 872 57
gdbm_failure_atomic /src/gdbm/src/gdbmsync.c 3 ['N/A', 'N/A', 'N/A'] 3 0 489 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%
332 / 545
Cyclomatic complexity statically reachable by fuzzers
74.0%
2583 / 3482

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

Directories in report

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