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

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 333 22.4%
gold [1:9] 11 0.74%
yellow [10:29] 4 0.26%
greenyellow [30:49] 2 0.13%
lawngreen 50+ 1134 76.4%
All colors 1484 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
150 234 6 :

['leveldb::log::Reader::ReportCorruption(unsigned long, char const*)', 'std::__1::basic_string , std::__1::allocator >::assign(char const*, unsigned long)', 'std::__1::basic_string , std::__1::allocator >::clear[abi:nn180100]()', 'leveldb::log::Reader::ReadPhysicalRecord(leveldb::Slice*)', 'std::__1::basic_string , std::__1::allocator >::size[abi:nn180100]() const', 'std::__1::basic_string , std::__1::allocator >::empty[abi:nn180100]() const']

150 258 leveldb::log::Reader::ReadRecord(leveldb::Slice*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/leveldb/db/log_reader.cc:133
42 56 2 :

['leveldb::VersionSet::NumLevelBytes(int) const', 'leveldb::VersionSet::NumLevelFiles(int) const']

42 60 leveldb::DBImpl::GetProperty(leveldb::Sliceconst&,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/leveldb/db/db_impl.cc:1428
39 111 9 :

['std::__1::basic_string , std::__1::allocator >::~basic_string()', 'leveldb::Status::ok() const', 'std::__1::basic_string , std::__1::allocator >::c_str[abi:nn180100]() const', 'operator new(unsigned long)', 'leveldb::log::Writer::Writer(leveldb::WritableFile*, unsigned long)', 'leveldb::ParseFileName(std::__1::basic_string , std::__1::allocator > const&, unsigned long*, leveldb::FileType*)', 'leveldb::Status::~Status()', 'leveldb::Log(leveldb::Logger*, char const*, ...)', 'leveldb::Status::ToString() const']

39 111 leveldb::VersionSet::ReuseManifest(std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >const&) call site: 00000 /src/leveldb/db/version_set.cc:996
18 18 1 :

['leveldb::NewEmptyIterator()']

18 18 leveldb::Block::NewIterator(leveldb::Comparatorconst*) call site: 00000 /src/leveldb/table/block.cc:285
18 18 1 :

['leveldb::NewEmptyIterator()']

18 18 leveldb::NewMergingIterator(leveldb::Comparatorconst*,leveldb::Iterator**,int) call site: 00000 /src/leveldb/table/merger.cc:182
16 16 1 :

['leveldb::log::Reader::SkipToInitialBlock()']

166 278 leveldb::log::Reader::ReadRecord(leveldb::Slice*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/leveldb/db/log_reader.cc:57
6 328 18 :

['leveldb::BlockContents::BlockContents()', '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8nn180100ILi0EEEPKc', 'leveldb::BytewiseComparator()', 'std::__1::basic_string , std::__1::allocator >::~basic_string()', 'leveldb::Block::Block(leveldb::BlockContents const&)', 'operator delete(void*)', 'leveldb::Status::~Status()', 'leveldb::Footer::metaindex_handle() const', 'leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*)', 'std::__1::basic_string , std::__1::allocator >::append(char const*)', 'operator new(unsigned long)', 'leveldb::Status::ok() const', 'leveldb::Table::ReadFilter(leveldb::Slice const&)', 'leveldb::Block::NewIterator(leveldb::Comparator const*)', 'leveldb::Slice::Slice(std::__1::basic_string , std::__1::allocator > const&)', 'leveldb::Block::~Block()', 'leveldb::operator==(leveldb::Slice const&, leveldb::Slice const&)', 'leveldb::ReadOptions::ReadOptions()']

6 328 leveldb::Table::ReadMeta(leveldb::Footerconst&) call site: 00000 /src/leveldb/table/table.cc:83
4 33 5 :

['leveldb::(anonymous namespace)::PosixLockTable::Remove(std::__1::basic_string , std::__1::allocator > const&)', 'std::__1::basic_string , std::__1::allocator > std::__1::operator+ , std::__1::allocator >(char const*, std::__1::basic_string , std::__1::allocator > const&)', 'leveldb::(anonymous namespace)::PosixError(std::__1::basic_string , std::__1::allocator > const&, int)', 'close', '__errno_location']

4 33 leveldb::(anonymousnamespace)::PosixEnv::LockFile(std::__1::basic_string ,std::__1::allocator >const&,leveldb::FileLock**) call site: 00000 /src/leveldb/util/env_posix.cc:669
4 32 5 :

['leveldb::Status::operator=(leveldb::Status&&)', 'read', 'leveldb::Status::~Status()', 'leveldb::(anonymous namespace)::PosixError(std::__1::basic_string , std::__1::allocator > const&, int)', '__errno_location']

4 34 leveldb::(anonymousnamespace)::PosixSequentialFile::Read(unsignedlong,leveldb::Slice*,char*) call site: 00000 /src/leveldb/util/env_posix.cc:146
4 27 3 :

['leveldb::(anonymous namespace)::PosixError(std::__1::basic_string , std::__1::allocator > const&, int)', 'close', '__errno_location']

4 27 leveldb::(anonymousnamespace)::PosixEnv::NewLogger(std::__1::basic_string ,std::__1::allocator >const&,leveldb::Logger**) call site: 00000 /src/leveldb/util/env_posix.cc:726
2 25 2 :

['leveldb::(anonymous namespace)::PosixError(std::__1::basic_string , std::__1::allocator > const&, int)', '__errno_location']

2 30 leveldb::(anonymousnamespace)::PosixWritableFile::SyncDirIfManifest() call site: 00000 /src/leveldb/util/env_posix.cc:382
2 25 4 :

['leveldb::(anonymous namespace)::PosixError(std::__1::basic_string , std::__1::allocator > const&, int)', 'std::__1::basic_string , std::__1::allocator > std::__1::operator+ , std::__1::allocator >(char const*, std::__1::basic_string , std::__1::allocator > const&)', '__errno_location', 'std::__1::basic_string , std::__1::allocator >::~basic_string()']

2 27 leveldb::(anonymousnamespace)::PosixEnv::UnlockFile(leveldb::FileLock*) call site: 00000 /src/leveldb/util/env_posix.cc:682

Runtime coverage analysis

Covered functions
583
Functions that are reachable but not covered
96
Reachable functions
789
Percentage of reachable functions covered
87.83%
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/leveldb/build/../fuzz_db.cc 3
/src/leveldb/util/options.cc 1
/src/leveldb/util/comparator.cc 3
/src/leveldb/./util/no_destructor.h 1
/src/leveldb/include/leveldb/comparator.h 2
/src/leveldb/util/env_posix.cc 7
/src/leveldb/util/env.cc 5
/src/leveldb/./port/port_stdcxx.h 13
/src/leveldb/db/db_impl.cc 30
/src/leveldb/include/leveldb/db.h 2
/src/leveldb/./db/dbformat.h 18
/src/leveldb/include/leveldb/filter_policy.h 1
/src/leveldb/include/leveldb/status.h 13
/src/leveldb/db/filename.cc 12
/src/leveldb/util/cache.cc 6
/src/leveldb/include/leveldb/cache.h 1
/src/leveldb/db/table_cache.cc 6
/src/leveldb/db/write_batch.cc 9
/src/leveldb/./db/snapshot.h 5
/src/leveldb/db/version_set.cc 50
/src/leveldb/./db/version_set.h 14
/src/leveldb/./db/version_edit.h 13
/src/leveldb/./db/db_impl.h 3
/src/leveldb/db/version_edit.cc 5
/src/leveldb/include/leveldb/slice.h 13
/src/leveldb/db/log_writer.cc 6
/src/leveldb/./util/crc32c.h 3
/src/leveldb/util/crc32c.cc 4
/src/leveldb/./util/coding.h 5
/src/leveldb/util/coding.cc 12
/src/leveldb/util/status.cc 3
/src/leveldb/./db/log_reader.h 1
/src/leveldb/db/log_reader.cc 8
/src/leveldb/util/logging.cc 3
/src/leveldb/db/memtable.cc 5
/src/leveldb/./db/memtable.h 5
/src/leveldb/util/arena.cc 5
/src/leveldb/./db/skiplist.h 6
/src/leveldb/./util/random.h 1
/src/leveldb/include/leveldb/write_batch.h 1
/src/leveldb/./util/arena.h 1
/src/leveldb/table/iterator.cc 5
/src/leveldb/db/builder.cc 1
/src/leveldb/table/table_builder.cc 13
/src/leveldb/table/block_builder.cc 5
/src/leveldb/table/filter_block.cc 6
/src/leveldb/./table/format.h 11
/src/leveldb/include/leveldb/table_builder.h 1
/src/leveldb/table/format.cc 5
/src/leveldb/./table/block_builder.h 2
/src/leveldb/./table/filter_block.h 1
/src/leveldb/include/leveldb/options.h 2
/src/leveldb/table/table.cc 11
/src/leveldb/table/block.cc 5
/src/leveldb/include/leveldb/table.h 1
/src/leveldb/table/two_level_iterator.cc 2
/src/leveldb/./table/iterator_wrapper.h 4
/src/leveldb/./table/block.h 1
/src/leveldb/include/leveldb/iterator.h 1
/src/leveldb/db/dbformat.cc 5
/src/leveldb/./util/mutexlock.h 2
/src/leveldb/table/merger.cc 2

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
leveldb::DBImpl::Get(leveldb::ReadOptionsconst&,leveldb::Sliceconst&,std::__1::basic_string ,std::__1::allocator >*) /src/leveldb/db/db_impl.cc 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 16 0 139 25 10 676 0 1323 126
leveldb::DBImpl::Write(leveldb::WriteOptionsconst&,leveldb::WriteBatch*) /src/leveldb/db/db_impl.cc 4 ['N/A', 'N/A', 'N/A', 'N/A'] 17 0 256 44 17 698 0 1325 65
leveldb::(anonymousnamespace)::ShardedLRUCache::Insert(leveldb::Sliceconst&,void*,unsignedlong,void(*)(leveldb::Sliceconst&,void*)) /src/leveldb/util/cache.cc 5 ['N/A', 'N/A', 'N/A', 'size_t', 'N/A'] 6 0 22 3 2 47 0 73 44
leveldb::(anonymousnamespace)::DBIter::Prev() /src/leveldb/db/db_iter.cc 1 ['N/A'] 19 0 121 12 5 640 0 1260 41
leveldb::(anonymousnamespace)::TwoLevelIterator::Seek(leveldb::Sliceconst&) /src/leveldb/table/two_level_iterator.cc 2 ['N/A', 'N/A'] 6 0 30 6 3 43 0 68 41
leveldb::Block::Iter::Seek(leveldb::Sliceconst&) /src/leveldb/table/block.cc 2 ['N/A', 'N/A'] 5 0 210 36 14 43 0 84 40
leveldb::(anonymousnamespace)::MemTableInserter::Delete(leveldb::Sliceconst&) /src/leveldb/db/write_batch.cc 2 ['N/A', 'N/A'] 8 0 25 3 2 64 0 113 39
leveldb::DBImpl::GetProperty(leveldb::Sliceconst&,std::__1::basic_string ,std::__1::allocator >*) /src/leveldb/db/db_impl.cc 3 ['N/A', 'N/A', 'N/A'] 6 0 487 69 26 67 0 116 35

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

Functions statically reachable by fuzzers
64.0%
493 / 766
Cyclomatic complexity statically reachable by fuzzers
71.0%
1955 / 2745

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
[] []
/usr/local/bin/../include/c++/v1/string [] []
/src/leveldb/./db/version_edit.h ['fuzz_db'] []
/src/leveldb/./table/filter_block.h ['fuzz_db'] []
/src/leveldb/util/status.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/memtable.h ['fuzz_db'] []
/src/leveldb/table/format.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/mutexlock.h ['fuzz_db'] []
/src/leveldb/./db/dbformat.h ['fuzz_db'] []
/src/leveldb/include/leveldb/db.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/db_iter.cc [] []
/src/leveldb/db/dbformat.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/crc32c.h ['fuzz_db'] []
/src/leveldb/db/builder.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/crc32c.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/random.h ['fuzz_db'] []
/src/leveldb/./util/no_destructor.h ['fuzz_db'] []
/src/leveldb/db/filename.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/iterator.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/build/../fuzz_db.cc ['fuzz_db'] []
/src/leveldb/util/cache.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/version_set.h ['fuzz_db'] []
/src/leveldb/./db/db_impl.h ['fuzz_db'] []
/src/leveldb/include/leveldb/table_builder.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/filter_block.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/arena.h ['fuzz_db'] []
/src/leveldb/include/leveldb/options.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/log_reader.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/format.h ['fuzz_db'] []
/src/leveldb/db/version_edit.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/two_level_iterator.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/memtable.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/write_batch.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/table.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/block_builder.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/write_batch_internal.h [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/leveldb/util/logging.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/options.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/merger.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/block.h ['fuzz_db'] []
/src/leveldb/include/leveldb/env.h [] []
/src/leveldb/util/env.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/filter_policy.cc [] []
/src/leveldb/table/table_builder.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/log_writer.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/arena.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/status.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/posix_logger.h [] []
/src/leveldb/db/write_batch.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/filter_policy.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/env_posix.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/iterator.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/block_builder.h ['fuzz_db'] []
/src/leveldb/include/leveldb/table.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/slice.h ['fuzz_db'] ['fuzz_db']
/usr/include/x86_64-linux-gnu/sys/stat.h [] []
/src/leveldb/table/block.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/comparator.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/coding.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/iterator_wrapper.h ['fuzz_db'] []
/src/leveldb/db/table_cache.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/snapshot.h ['fuzz_db'] []
/src/leveldb/db/version_set.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/hash.cc [] []
/src/leveldb/./db/skiplist.h ['fuzz_db'] []
/src/leveldb/include/leveldb/cache.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/comparator.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/coding.h ['fuzz_db'] []
/src/leveldb/./db/log_reader.h ['fuzz_db'] []
/src/leveldb/./port/port_stdcxx.h ['fuzz_db'] []
/src/leveldb/db/db_impl.cc ['fuzz_db'] ['fuzz_db']

Directories in report

Directory
/src/leveldb/db/
/src/leveldb/./db/
/src/leveldb/./table/
/src/leveldb/util/
/src/leveldb/include/leveldb/
/src/leveldb/build/../
/src/leveldb/./port/
/usr/include/x86_64-linux-gnu/sys/
/src/leveldb/./util/
/usr/local/bin/../include/c++/v1/
/src/leveldb/table/