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: tools/morphfuzzer.cxx

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: tools/hzfuzzer.cxx

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: tools/persdicfuzzer.cxx

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: tools/parserfuzzer.cxx

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: tools/affdicfuzzer.cxx

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: tools/fuzzer.cxx

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

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
AffixMgr::compound_check /src/hunspell/src/hunspell/affixmgr.cxx 11 ['std::string', 'short', 'short', 'short', 'short', 'hentry**', 'hentry**', 'char', 'char', 'int*', 'AffixScratch'] 8 0 287 81 350 128 1 636 623
AffixMgr::compound_check_morph /src/hunspell/src/hunspell/affixmgr.cxx 11 ['std::string', 'short', 'short', 'short', 'short', 'hentry**', 'hentry**', 'char', 'std::string', 'std::string*', 'AffixScratch'] 8 0 272 69 269 155 1 876 613
AffixMgr::AffixMgr /src/hunspell/src/hunspell/affixmgr.cxx 3 ['char*', 'std::vector >', 'char*'] 7 0 86 7 10 194 0 550 517
SuggestMgr::ngsuggest /src/hunspell/src/hunspell/suggestmgr.cxx 4 ['std::vector ', 'char*', 'std::vector >', 'int'] 4 0 321 70 123 122 0 412 353
SuggestMgr::suggest /src/hunspell/src/hunspell/suggestmgr.cxx 4 ['std::vector ', 'std::string', 'int*', 'bool'] 6 0 131 56 94 120 0 371 286
HashMgr::HashMgr /src/hunspell/src/hunspell/hashmgr.cxx 3 ['char*', 'char*', 'char*'] 6 0 9 3 2 168 0 432 281
HunspellImpl::spell_internal /src/hunspell/src/hunspell/hunspell.cxx 5 ['std::string', 'std::vector ', 'int*', 'std::string*', 'std::chrono::steady_clock::time_point'] 7 0 236 70 135 135 0 331 238
interactive_interface /src/hunspell/src/tools/hunspell.cxx 3 ['Hunspell**', 'char*', 'int'] 6 0 105 22 24 152 0 279 235
HunspellImpl::suggest_internal /src/hunspell/src/hunspell/hunspell.cxx 7 ['std::string', 'std::vector ', 'std::vector ', 'bool', 'size_t', 'int', 'std::chrono::steady_clock::time_point'] 6 0 217 65 88 163 0 325 136
SfxEntry::checkword /src/hunspell/src/hunspell/affentry.cxx 9 ['std::string', 'int', 'int', 'int', 'PfxEntry*', 'FLAG', 'FLAG', 'FLAG', 'AffixScratch'] 4 0 45 17 21 53 0 143 116

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

Functions statically reachable by fuzzers
50.0%
279 / 553
Cyclomatic complexity statically reachable by fuzzers
76.0%
3241 / 4252

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

Fuzz driver synthesis

New fuzzers

The below fuzzers are templates and suggestions for how to target the set of optimal functions above

affixmgr.cxx

Target file: /src/hunspell/src/hunspell/affixmgr.cxx
Target functions: AffixMgr::compound_check, AffixMgr::compound_check_morph, AffixMgr::AffixMgr
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target AffixMgr::compound_check */
  UNKNOWN_TYPE unknown_0;
  UNKNOWN_TYPE unknown_1;
  UNKNOWN_TYPE unknown_2;
  UNKNOWN_TYPE unknown_3;
  UNKNOWN_TYPE unknown_4;
  UNKNOWN_TYPE unknown_5;
  UNKNOWN_TYPE unknown_6;
  UNKNOWN_TYPE unknown_7;
  UNKNOWN_TYPE unknown_8;
  int *new_var9 = af_get_int_p();
  UNKNOWN_TYPE unknown_10;
  AffixMgr::compound_check(unknown_0, unknown_1, unknown_2, unknown_3, unknown_4, unknown_5, unknown_6, unknown_7, unknown_8, new_var9, unknown_10);

  /* target AffixMgr::compound_check_morph */
  UNKNOWN_TYPE unknown_11;
  UNKNOWN_TYPE unknown_12;
  UNKNOWN_TYPE unknown_13;
  UNKNOWN_TYPE unknown_14;
  UNKNOWN_TYPE unknown_15;
  UNKNOWN_TYPE unknown_16;
  UNKNOWN_TYPE unknown_17;
  UNKNOWN_TYPE unknown_18;
  UNKNOWN_TYPE unknown_19;
  UNKNOWN_TYPE unknown_20;
  UNKNOWN_TYPE unknown_21;
  AffixMgr::compound_check_morph(unknown_11, unknown_12, unknown_13, unknown_14, unknown_15, unknown_16, unknown_17, unknown_18, unknown_19, unknown_20, unknown_21);

  /* target AffixMgr::AffixMgr */
  char *new_var22 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_23;
  char *new_var24 = ada_safe_get_char_p();
  AffixMgr::AffixMgr(new_var22, unknown_23, new_var24);

  af_safe_gb_cleanup();
}

suggestmgr.cxx

Target file: /src/hunspell/src/hunspell/suggestmgr.cxx
Target functions: SuggestMgr::ngsuggest, SuggestMgr::suggest
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target SuggestMgr::ngsuggest */
  UNKNOWN_TYPE unknown_25;
  char *new_var26 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_27;
  int new_var28 = ada_safe_get_int();
  SuggestMgr::ngsuggest(unknown_25, new_var26, unknown_27, new_var28);

  /* target SuggestMgr::suggest */
  UNKNOWN_TYPE unknown_29;
  UNKNOWN_TYPE unknown_30;
  int *new_var31 = af_get_int_p();
  UNKNOWN_TYPE unknown_32;
  SuggestMgr::suggest(unknown_29, unknown_30, new_var31, unknown_32);

  af_safe_gb_cleanup();
}

hashmgr.cxx

Target file: /src/hunspell/src/hunspell/hashmgr.cxx
Target functions: HashMgr::HashMgr
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target HashMgr::HashMgr */
  char *new_var33 = ada_safe_get_char_p();
  char *new_var34 = ada_safe_get_char_p();
  char *new_var35 = ada_safe_get_char_p();
  HashMgr::HashMgr(new_var33, new_var34, new_var35);

  af_safe_gb_cleanup();
}

hunspell.cxx

Target file: /src/hunspell/src/hunspell/hunspell.cxx
Target functions: HunspellImpl::spell_internal, HunspellImpl::suggest_internal
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target HunspellImpl::spell_internal */
  UNKNOWN_TYPE unknown_36;
  UNKNOWN_TYPE unknown_37;
  int *new_var38 = af_get_int_p();
  UNKNOWN_TYPE unknown_39;
  UNKNOWN_TYPE unknown_40;
  HunspellImpl::spell_internal(unknown_36, unknown_37, new_var38, unknown_39, unknown_40);

  /* target HunspellImpl::suggest_internal */
  UNKNOWN_TYPE unknown_44;
  UNKNOWN_TYPE unknown_45;
  UNKNOWN_TYPE unknown_46;
  UNKNOWN_TYPE unknown_47;
  UNKNOWN_TYPE unknown_48;
  int new_var49 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_50;
  HunspellImpl::suggest_internal(unknown_44, unknown_45, unknown_46, unknown_47, unknown_48, new_var49, unknown_50);

  af_safe_gb_cleanup();
}

hunspell.cxx

Target file: /src/hunspell/src/tools/hunspell.cxx
Target functions: interactive_interface
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target interactive_interface */
  UNKNOWN_TYPE unknown_41;
  char *new_var42 = ada_safe_get_char_p();
  int new_var43 = ada_safe_get_int();
  interactive_interface(unknown_41, new_var42, new_var43);

  af_safe_gb_cleanup();
}

affentry.cxx

Target file: /src/hunspell/src/hunspell/affentry.cxx
Target functions: SfxEntry::checkword
#include "ada_fuzz_header.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  af_safe_gb_init(data, size);

  /* target SfxEntry::checkword */
  UNKNOWN_TYPE unknown_51;
  int new_var52 = ada_safe_get_int();
  int new_var53 = ada_safe_get_int();
  int new_var54 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_55;
  UNKNOWN_TYPE unknown_56;
  UNKNOWN_TYPE unknown_57;
  UNKNOWN_TYPE unknown_58;
  UNKNOWN_TYPE unknown_59;
  SfxEntry::checkword(unknown_51, new_var52, new_var53, new_var54, unknown_55, unknown_56, unknown_57, unknown_58, unknown_59);

  af_safe_gb_cleanup();
}

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/hunspelltrace.hxx [] []
/src/hunspell/src/hunspell/hunzip.cxx ['tools/hzfuzzer.cxx'] []
/src/hunspell/src/hunspell/w_char.hxx [] []
/src/hunspell/src/parsers/xmlparser.cxx [] []
/src/hunspell/src/tools/parserfuzzer.cxx ['tools/parserfuzzer.cxx'] []
/src/hunspell/src/parsers/htmlparser.cxx [] []
/src/hunspell/src/hunspell/affixmgr.cxx [] []
/src/hunspell/src/tools/affdicfuzzer.cxx ['tools/affdicfuzzer.cxx'] []
/src/hunspell/src/hunspell/hunspell.cxx ['tools/morphfuzzer.cxx', 'tools/persdicfuzzer.cxx', 'tools/affdicfuzzer.cxx'] []
/src/hunspell/src/parsers/testparser.cxx [] []
/src/hunspell/src/tools/morphfuzzer.cxx ['tools/morphfuzzer.cxx'] []
/src/hunspell/src/hunspell/filemgr.hxx [] []
/src/hunspell/src/parsers/textparser.cxx ['tools/parserfuzzer.cxx'] []
/src/hunspell/src/hunspell/affentry.hxx [] []
/src/hunspell/src/parsers/firstparser.cxx [] []
/src/hunspell/src/hunspell/htypes.hxx [] []
/src/hunspell/src/hunspell/csutil.cxx ['tools/parserfuzzer.cxx'] []
/src/hunspell/src/hunspell/atypes.hxx [] []
/src/hunspell/src/hunspell/baseaffix.hxx [] []
/src/hunspell/src/hunspell/replist.cxx [] []
/src/hunspell/src/hunspell/hunspell.hxx [] []
/src/hunspell/src/parsers/latexparser.cxx [] []
/src/hunspell/src/hunspell/phonet.cxx [] []
/src/hunspell/src/hunspell/replist.hxx [] []
/src/hunspell/src/hunspell/hunspelltrace.cxx [] []
/src/hunspell/src/hunspell/hashmgr.cxx [] []
/src/hunspell/src/parsers/textparser.hxx [] []
/src/hunspell/src/tools/persdicfuzzer.cxx ['tools/persdicfuzzer.cxx'] []
/src/hunspell/src/tools/hzip.cxx [] []
/src/hunspell/src/hunspell/csutil.hxx [] []
/src/hunspell/src/tools/hunspell.cxx [] []
/src/hunspell/src/tools/hzfuzzer.cxx ['tools/hzfuzzer.cxx'] []
/src/hunspell/src/tools/munch.cxx [] []
/src/hunspell/src/hunspell/hunversion.h [] []
/src/hunspell/src/parsers/manparser.cxx [] []
/src/hunspell/src/parsers/odfparser.cxx [] []
/src/hunspell/src/hunspell/suggestmgr.cxx [] []
/src/hunspell/src/hunspell/suggestmgr.hxx [] []
/src/hunspell/src/hunspell/hunzip.hxx [] []
/src/hunspell/src/hunspell/affentry.cxx [] []
/src/hunspell/src/tools/fuzzer.cxx ['tools/fuzzer.cxx'] []
/src/hunspell/src/hunspell/filemgr.cxx ['tools/hzfuzzer.cxx'] []

Directories in report

Directory
/src/hunspell/src/parsers/
/src/hunspell/src/tools/
/src/hunspell/src/hunspell/