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

Fuzzer details

Fuzzer: fuzz_mdb

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 219 47.9%
gold [1:9] 22 4.81%
yellow [10:29] 69 15.0%
greenyellow [30:49] 17 3.71%
lawngreen 50+ 130 28.4%
All colors 457 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
315 353 8 :

['g_ptr_array_add', 'mdb_get_int16', 'mdb_get_int32', 'mdb_read_props_list', 'mdb_debug', 'mdb_read_props', 'g_ptr_array_new', 'free_names']

315 353 mdb_kkd_to_props call site: 00223 /src/mdbtools/src/libmdb/props.c:192
6 6 2 :

['malloc', 'decompress_unicode']

6 18 mdb_unicode2ascii call site: 00174 /src/mdbtools/src/libmdb/iconv.c:150
2 49 3 :

['mdb_get_int32', 'strcpy', 'mdb_find_pg_row']

2 77 mdb_memo_to_string call site: 00291 /src/mdbtools/src/libmdb/data.c:827
2 2 1 :

['perror']

2 2 _mdb_read_pg call site: 00053 /src/mdbtools/src/libmdb/file.c:373
2 2 1 :

['strcmp']

2 2 mdb_read_columns call site: 00177 /src/mdbtools/src/libmdb/table.c:332
0 133 3 :

['mdb_debug', 'mdb_get_int32', 'mdb_find_pg_row']

0 133 mdb_ole_read call site: 00203 /src/mdbtools/src/libmdb/data.c:639
0 66 3 :

['mdb_get_option', 'mdb_buffer_dump', 'mdb_debug']

0 66 mdb_ole_read call site: 00200 /src/mdbtools/src/libmdb/data.c:627
0 30 2 :

['mdb_get_int32', 'mdb_debug']

0 30 mdb_ole_read_next call site: 00215 /src/mdbtools/src/libmdb/data.c:584
0 28 1 :

['mdb_unicode2ascii']

0 28 mdb_memo_to_string call site: 00286 /src/mdbtools/src/libmdb/data.c:796
0 23 1 :

['mdb_free_catalog']

0 40 mdb_read_catalog call site: 00186 /src/mdbtools/src/libmdb/catalog.c:122
0 17 1 :

['mdb_free_tabledef']

0 17 mdb_read_table call site: 00148 /src/mdbtools/src/libmdb/table.c:103
0 13 1 :

['mdb_buffer_dump']

0 137 mdb_read_table call site: 00122 /src/mdbtools/src/libmdb/table.c:96

Runtime coverage analysis

Covered functions
90
Functions that are reachable but not covered
82
Reachable functions
172
Percentage of reachable functions covered
52.33%
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/mdbtools/src/fuzz/fuzz_mdb.c 1
file.c 13
backend.c 6
fakeglib.c 12
data.c 26
rc4.c 3
catalog.c 2
props.c 8
iconv.c 6
table.c 11
index.c 14
options.c 3
dump.c 1
money.c 5
map.c 3
sargs.c 8
like.c 1
write.c 3

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
mdb_print_schema /src/mdbtools/src/libmdb/backend.c 5 ['struct.MdbHandle *', 'struct._IO_FILE *', 'char *', 'char *', 'int '] 6 0 221 34 12 169 0 889 152
mdb_insert_row /src/mdbtools/src/libmdb/write.c 3 ['struct.S_MdbTableDef *', 'int ', 'struct.MdbField *'] 6 0 165 19 8 61 0 261 120
mdb_print_col /src/mdbtools/src/libmdb/backend.c 8 ['struct._IO_FILE *', 'char *', 'int ', 'int ', 'int ', 'char *', 'char *', 'int '] 0 0 749 159 64 5 0 74 66
g_option_context_parse /src/mdbtools/src/libmdb/fakeglib.c 4 ['struct.GOptionContext *', 'int *', 'char ***', 'struct.GError **'] 2 0 511 60 20 17 0 67 42

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

Functions statically reachable by fuzzers
75.0%
180 / 240
Cyclomatic complexity statically reachable by fuzzers
80.0%
1137 / 1426

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/mdbtools/src/libmdb/write.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/catalog.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/fakeglib.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/options.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/table.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/fuzz/fuzz_mdb.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/data.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/money.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/map.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/props.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/iconv.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/like.c ['fuzz_mdb'] []
/src/mdbtools/src/libmdb/backend.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/file.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/sargs.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/index.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/rc4.c ['fuzz_mdb'] ['fuzz_mdb']
/src/mdbtools/src/libmdb/dump.c ['fuzz_mdb'] ['fuzz_mdb']

Directories in report

Directory
/src/mdbtools/src/fuzz/
/src/mdbtools/src/libmdb/