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: 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 525 38.9%
gold [1:9] 21 1.55%
yellow [10:29] 15 1.11%
greenyellow [30:49] 15 1.11%
lawngreen 50+ 773 57.3%
All colors 1349 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
350 568 HashMgr::encode_flag(unsigned short) const call site: 00568 strstr
50 921 SfxEntry::add(char const*, unsigned long) call site: 00921 strstr
23 524 HunspellImpl::suggest_internal(std::__1::basic_string , std::__1::allocator > const&, std::__1::vector , std::__1::allocator >, std::__1::allocator , std::__1::allocator > > >&, std::__1::vector , std::__1::allocator >, std::__1::allocator , std::__1::allocator > > >&, bool&, unsigned long&, int&) call site: 00524 strlen
17 550 HENTRY_FIND(hentry*, char const*) call site: 00550
17 981 HunspellImpl::mkinitcap(std::__1::basic_string , std::__1::allocator >&) call site: 00981 strlen
7 1050 HashMgr::add_hidden_capitalized_word(std::__1::basic_string , std::__1::allocator > const&, int, unsigned short*, int, std::__1::basic_string , std::__1::allocator > const*, int) call site: 01050
6 137 AffixMgr::suffix_check(std::__1::basic_string , std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char) call site: 00137
4 269 AffixMgr::compound_check(std::__1::basic_string , std::__1::allocator > const&, short, short, short, short, hentry**, hentry**, char, char, int*) call site: 00269 strncmp
4 1219 AffixMgr::expand_rootword(guessword*, int, char const*, int, unsigned short const*, unsigned short, char const*, int, char const*) call site: 01219
3 94 AffixMgr::suffix_check(std::__1::basic_string , std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char) call site: 00094
2 51 HunspellImpl::checkword(std::__1::basic_string , std::__1::allocator > const&, int*, std::__1::basic_string , std::__1::allocator >*) call site: 00051
2 208 HunspellImpl::checkword(std::__1::basic_string , std::__1::allocator > const&, int*, std::__1::basic_string , std::__1::allocator >*) call site: 00208

Runtime coverage analysis

Covered functions
287
Functions that are reachable but not covered
85
Reachable functions
485
Percentage of reachable functions covered
82.47%
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/hunspell/./src/tools/fuzzer.cxx 1
/src/hunspell/src/hunspell/hunspell.cxx 34
/src/hunspell/src/hunspell/affixmgr.cxx 55
/src/hunspell/src/hunspell/replist.cxx 3
/src/hunspell/src/hunspell/csutil.cxx 40
/src/hunspell/src/hunspell/./atypes.hxx 1
/src/hunspell/src/hunspell/./w_char.hxx 2
/src/hunspell/src/hunspell/hashmgr.cxx 14
/src/hunspell/src/hunspell/./affentry.hxx 23
/src/hunspell/src/hunspell/affentry.cxx 14
/src/hunspell/src/hunspell/suggestmgr.cxx 43
/src/hunspell/src/hunspell/./csutil.hxx 4
/src/hunspell/src/hunspell/phonet.cxx 3

Fuzzer: affdicfuzzer

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 602 30.4%
gold [1:9] 83 4.19%
yellow [10:29] 55 2.78%
greenyellow [30:49] 33 1.66%
lawngreen 50+ 1204 60.9%
All colors 1977 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
390 1195 HunspellImpl::suggest_internal(std::__1::basic_string , std::__1::allocator > const&, std::__1::vector , std::__1::allocator >, std::__1::allocator , std::__1::allocator > > >&, std::__1::vector , std::__1::allocator >, std::__1::allocator , std::__1::allocator > > >&, bool&, unsigned long&, int&) call site: 01195 strlen
50 1588 SfxEntry::add(char const*, unsigned long) call site: 01588 strstr
27 1648 HunspellImpl::mkinitcap(std::__1::basic_string , std::__1::allocator >&) call site: 01648 strlen
17 7 FileMgr::FileMgr(char const*, char const*) call site: 00007 strncmp
7 30 FileMgr::getline(std::__1::basic_string , std::__1::allocator >&) call site: 00030 strlen
6 816 AffixMgr::suffix_check(std::__1::basic_string , std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char) call site: 00816
4 948 AffixMgr::compound_check(std::__1::basic_string , std::__1::allocator > const&, short, short, short, short, hentry**, hentry**, char, char, int*) call site: 00948 strncmp
4 1833 AffixMgr::expand_rootword(guessword*, int, char const*, int, unsigned short const*, unsigned short, char const*, int, char const*) call site: 01833
3 25 FileMgr::FileMgr(char const*, char const*) call site: 00025 fprintf
3 773 AffixMgr::suffix_check(std::__1::basic_string , std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char) call site: 00773
2 93 HashMgr::parse_aliasf(std::__1::basic_string , std::__1::allocator > const&, FileMgr*) call site: 00093
2 128 HashMgr::parse_aliasm(std::__1::basic_string , std::__1::allocator > const&, FileMgr*) call site: 00128

Runtime coverage analysis

Covered functions
287
Functions that are reachable but not covered
112
Reachable functions
690
Percentage of reachable functions covered
83.77%
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/hunspell/./src/tools/affdicfuzzer.cxx 1
/src/hunspell/src/hunspell/hunspell.cxx 38
/src/hunspell/src/hunspell/hashmgr.cxx 28
/src/hunspell/src/hunspell/filemgr.cxx 5
/src/hunspell/src/hunspell/csutil.cxx 44
/src/hunspell/src/hunspell/hunzip.cxx 7
/src/hunspell/src/hunspell/./atypes.hxx 1
/src/hunspell/src/hunspell/./w_char.hxx 4
/src/hunspell/src/hunspell/./csutil.hxx 4
/src/hunspell/src/hunspell/affixmgr.cxx 98
/src/hunspell/src/hunspell/./affentry.hxx 31
/src/hunspell/src/hunspell/replist.cxx 7
/src/hunspell/src/hunspell/./phonet.hxx 2
/src/hunspell/src/hunspell/phonet.cxx 4
/src/hunspell/src/hunspell/affentry.cxx 17
/src/hunspell/src/hunspell/./baseaffix.hxx 1
/src/hunspell/src/hunspell/suggestmgr.cxx 45

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

/src/hunspell/./src/tools/fuzzer.cxx

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['HashMgr::encode_flag(unsigned short) const', 'SfxEntry::add(char const*, unsigned long)', 'HunspellImpl::suggest_internal(std::__1::basic_string, std::__1::allocator > const&, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&, bool&, unsigned long&, int&)', 'HENTRY_FIND(hentry*, char const*)', 'HunspellImpl::mkinitcap(std::__1::basic_string, std::__1::allocator >&)', 'HashMgr::add_hidden_capitalized_word(std::__1::basic_string, std::__1::allocator > const&, int, unsigned short*, int, std::__1::basic_string, std::__1::allocator > const*, int)', 'AffixMgr::suffix_check(std::__1::basic_string, std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char)', 'AffixMgr::compound_check(std::__1::basic_string, std::__1::allocator > const&, short, short, short, short, hentry**, hentry**, char, char, int*)', 'AffixMgr::expand_rootword(guessword*, int, char const*, int, unsigned short const*, unsigned short, char const*, int, char const*)', 'AffixMgr::suffix_check(std::__1::basic_string, std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char)']

/src/hunspell/./src/tools/affdicfuzzer.cxx

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['HunspellImpl::suggest_internal(std::__1::basic_string, std::__1::allocator > const&, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >&, bool&, unsigned long&, int&)', 'SfxEntry::add(char const*, unsigned long)', 'HunspellImpl::mkinitcap(std::__1::basic_string, std::__1::allocator >&)', 'FileMgr::FileMgr(char const*, char const*)', 'FileMgr::getline(std::__1::basic_string, std::__1::allocator >&)', 'AffixMgr::suffix_check(std::__1::basic_string, std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char)', 'AffixMgr::compound_check(std::__1::basic_string, std::__1::allocator > const&, short, short, short, short, hentry**, hentry**, char, char, int*)', 'AffixMgr::expand_rootword(guessword*, int, char const*, int, unsigned short const*, unsigned short, char const*, int, char const*)', 'FileMgr::FileMgr(char const*, char const*)', 'AffixMgr::suffix_check(std::__1::basic_string, std::__1::allocator > const&, int, int, int, PfxEntry*, unsigned short, unsigned short, char)']

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/hunspell/src/hunspell/./w_char.hxx ['fuzzer', 'affdicfuzzer'] []
/src/hunspell/src/hunspell/replist.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/src/hunspell/src/hunspell/./phonet.hxx ['affdicfuzzer'] []
/usr/local/bin/../include/c++/v1/sstream [] []
/src/hunspell/src/hunspell/hunspell.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/src/hunspell/src/hunspell/suggestmgr.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/src/hunspell/src/hunspell/hunzip.cxx ['affdicfuzzer'] ['affdicfuzzer']
/usr/local/bin/../include/c++/v1/string [] []
/src/hunspell/src/hunspell/csutil.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/src/hunspell/src/hunspell/filemgr.cxx ['affdicfuzzer'] ['affdicfuzzer']
/src/hunspell/./src/tools/fuzzer.cxx ['fuzzer'] []
/src/hunspell/src/tools/fuzzer.cxx [] []
/src/hunspell/src/hunspell/affentry.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/src/hunspell/src/hunspell/./atypes.hxx ['fuzzer', 'affdicfuzzer'] []
/src/hunspell/src/hunspell/affixmgr.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/src/hunspell/src/hunspell/./csutil.hxx ['fuzzer', 'affdicfuzzer'] []
/src/hunspell/src/hunspell/./baseaffix.hxx ['affdicfuzzer'] []
/src/hunspell/./src/tools/affdicfuzzer.cxx ['affdicfuzzer'] []
/src/hunspell/src/hunspell/hashmgr.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/src/hunspell/src/hunspell/./affentry.hxx ['fuzzer', 'affdicfuzzer'] []
/src/hunspell/src/hunspell/phonet.cxx ['fuzzer', 'affdicfuzzer'] ['fuzzer', 'affdicfuzzer']
/usr/local/bin/../include/c++/v1/istream [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []

Directories in report

Directory
/usr/local/bin/../include/c++/v1/
/src/hunspell/src/tools/
/src/hunspell/src/hunspell/./
/src/hunspell/./src/tools/
/src/hunspell/src/hunspell/