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: tests/fuzzing/fuzz_translate.c

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: tests/fuzzing/fuzz_translate_generic.c

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: tests/fuzzing/fuzz_backtranslate.c

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: tests/fuzzing/table_fuzzer.cc

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
EXPORT_CALL::lou_translatePrehyphenated /src/liblouis/liblouis/lou_translateString.c 13 ['char*', 'widechar*', 'int*', 'widechar*', 'int*', 'formtype*', 'char*', 'int*', 'int*', 'int*', 'char*', 'char*', 'int'] 15 0 27 10 11 205 0 2314 2314
EXPORT_CALL::lou_hyphenate /src/liblouis/liblouis/lou_translateString.c 5 ['char*', 'widechar*', 'int', 'char*', 'int'] 15 0 59 14 32 178 0 1767 407
read_tests /src/liblouis/tools/lou_checkyaml.c 4 ['yaml_parser_t*', 'char**', 'char*', 'int'] 10 0 19 5 6 72 0 213 209
find_matching_rules /src/liblouis/liblouis/maketable.c 6 ['widechar*', 'int', 'widechar*', 'int', 'char*', 'int'] 3 0 186 48 89 18 3 187 187
pattern_compile_expression /src/liblouis/liblouis/pattern.c 9 ['widechar*', 'int', 'int*', 'widechar*', 'int', 'widechar*', 'widechar*', 'TranslationTableHeader*', 'FileInfo*'] 3 0 269 76 77 9 4 164 164
EXPORT_CALL::lou_findTable /src/liblouis/liblouis/metadata.c 1 ['char*'] 5 0 19 5 5 49 0 153 137
rpl_stat /src/liblouis/tools/gnulib/stat.c 2 ['char*', 'struct stat*'] 3 0 157 43 57 37 0 122 121
pattern_output_expression /src/liblouis/liblouis/pattern.c 3 ['widechar*', 'int', 'TranslationTableHeader*'] 3 0 152 50 55 13 3 117 111
pattern_check_expression /src/liblouis/liblouis/pattern.c 12 ['widechar*', 'int*', 'int', 'int', 'widechar*', 'widechar*', 'int', 'int', 'int', 'int', 'int*', 'TranslationTableHeader*'] 5 0 181 42 48 13 3 110 105
_getopt_internal_r /src/liblouis/tools/gnulib/getopt.c 8 ['int', 'char**', 'char*', 'struct option*', 'int*', 'int', 'struct _getopt_data*', 'int'] 3 0 110 37 50 20 5 104 101

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

Functions statically reachable by fuzzers
38.0%
281 / 736
Cyclomatic complexity statically reachable by fuzzers
71.0%
3592 / 5081

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

lou_translateString.c

Target file: /src/liblouis/liblouis/lou_translateString.c
Target functions: EXPORT_CALL::lou_translatePrehyphenated, EXPORT_CALL::lou_hyphenate
#include "ada_fuzz_header.h"

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

  /* target EXPORT_CALL::lou_translatePrehyphenated */
  char *new_var0 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_1;
  int *new_var2 = af_get_int_p();
  UNKNOWN_TYPE unknown_3;
  int *new_var4 = af_get_int_p();
  UNKNOWN_TYPE unknown_5;
  char *new_var6 = ada_safe_get_char_p();
  int *new_var7 = af_get_int_p();
  int *new_var8 = af_get_int_p();
  int *new_var9 = af_get_int_p();
  char *new_var10 = ada_safe_get_char_p();
  char *new_var11 = ada_safe_get_char_p();
  int new_var12 = ada_safe_get_int();
  EXPORT_CALL::lou_translatePrehyphenated(new_var0, unknown_1, new_var2, unknown_3, new_var4, unknown_5, new_var6, new_var7, new_var8, new_var9, new_var10, new_var11, new_var12);

  /* target EXPORT_CALL::lou_hyphenate */
  char *new_var13 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_14;
  int new_var15 = ada_safe_get_int();
  char *new_var16 = ada_safe_get_char_p();
  int new_var17 = ada_safe_get_int();
  EXPORT_CALL::lou_hyphenate(new_var13, unknown_14, new_var15, new_var16, new_var17);

  af_safe_gb_cleanup();
}

lou_checkyaml.c

Target file: /src/liblouis/tools/lou_checkyaml.c
Target functions: read_tests
#include "ada_fuzz_header.h"

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

  /* target read_tests */
  UNKNOWN_TYPE unknown_18;
  char **new_var19 = af_get_double_char_p();
  char *new_var20 = ada_safe_get_char_p();
  int new_var21 = ada_safe_get_int();
  read_tests(unknown_18, new_var19, new_var20, new_var21);

  af_safe_gb_cleanup();
}

maketable.c

Target file: /src/liblouis/liblouis/maketable.c
Target functions: find_matching_rules
#include "ada_fuzz_header.h"

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

  /* target find_matching_rules */
  UNKNOWN_TYPE unknown_22;
  int new_var23 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_24;
  int new_var25 = ada_safe_get_int();
  char *new_var26 = ada_safe_get_char_p();
  int new_var27 = ada_safe_get_int();
  find_matching_rules(unknown_22, new_var23, unknown_24, new_var25, new_var26, new_var27);

  af_safe_gb_cleanup();
}

pattern.c

Target file: /src/liblouis/liblouis/pattern.c
Target functions: pattern_compile_expression, pattern_output_expression, pattern_check_expression
#include "ada_fuzz_header.h"

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

  /* target pattern_compile_expression */
  UNKNOWN_TYPE unknown_28;
  int new_var29 = ada_safe_get_int();
  int *new_var30 = af_get_int_p();
  UNKNOWN_TYPE unknown_31;
  int new_var32 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_33;
  UNKNOWN_TYPE unknown_34;
  UNKNOWN_TYPE unknown_35;
  UNKNOWN_TYPE unknown_36;
  pattern_compile_expression(unknown_28, new_var29, new_var30, unknown_31, new_var32, unknown_33, unknown_34, unknown_35, unknown_36);

  /* target pattern_output_expression */
  UNKNOWN_TYPE unknown_40;
  int new_var41 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_42;
  pattern_output_expression(unknown_40, new_var41, unknown_42);

  /* target pattern_check_expression */
  UNKNOWN_TYPE unknown_43;
  int *new_var44 = af_get_int_p();
  int new_var45 = ada_safe_get_int();
  int new_var46 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_47;
  UNKNOWN_TYPE unknown_48;
  int new_var49 = ada_safe_get_int();
  int new_var50 = ada_safe_get_int();
  int new_var51 = ada_safe_get_int();
  int new_var52 = ada_safe_get_int();
  int *new_var53 = af_get_int_p();
  UNKNOWN_TYPE unknown_54;
  pattern_check_expression(unknown_43, new_var44, new_var45, new_var46, unknown_47, unknown_48, new_var49, new_var50, new_var51, new_var52, new_var53, unknown_54);

  af_safe_gb_cleanup();
}

metadata.c

Target file: /src/liblouis/liblouis/metadata.c
Target functions: EXPORT_CALL::lou_findTable
#include "ada_fuzz_header.h"

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

  /* target EXPORT_CALL::lou_findTable */
  char *new_var37 = ada_safe_get_char_p();
  EXPORT_CALL::lou_findTable(new_var37);

  af_safe_gb_cleanup();
}

stat.c

Target file: /src/liblouis/tools/gnulib/stat.c
Target functions: rpl_stat
#include "ada_fuzz_header.h"

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

  /* target rpl_stat */
  char *new_var38 = ada_safe_get_char_p();
  structstat* new_var39 = calloc(sizeof(structstat), 1);
  rpl_stat(new_var38, new_var39);

  af_safe_gb_cleanup();
}

getopt.c

Target file: /src/liblouis/tools/gnulib/getopt.c
Target functions: _getopt_internal_r
#include "ada_fuzz_header.h"

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

  /* target _getopt_internal_r */
  int new_var55 = ada_safe_get_int();
  char **new_var56 = af_get_double_char_p();
  char *new_var57 = ada_safe_get_char_p();
  structoption* new_var58 = calloc(sizeof(structoption), 1);
  int *new_var59 = af_get_int_p();
  int new_var60 = ada_safe_get_int();
  struct_getopt_data* new_var61 = calloc(sizeof(struct_getopt_data), 1);
  int new_var62 = ada_safe_get_int();
  _getopt_internal_r(new_var55, new_var56, new_var57, new_var58, new_var59, new_var60, new_var61, new_var62);

  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/liblouis/tools/gnulib/close.c [] []
/src/liblouis/gnulib/string.in.h [] []
/src/liblouis/tools/gnulib/getopt-ext.h [] []
/src/liblouis/tools/gnulib/stdarg.in.h [] []
/src/liblouis/tools/gnulib/stdio-read.c [] []
/src/liblouis/tools/gnulib/strerror-override.h [] []
/src/liblouis/tools/gnulib/stdio-write.c ['tests/fuzzing/fuzz_translate.c', 'tests/fuzzing/fuzz_translate_generic.c', 'tests/fuzzing/fuzz_backtranslate.c'] []
/src/liblouis/tools/gnulib/filename.h [] []
/src/liblouis/tools/gnulib/fd-hook.c [] []
/src/liblouis/tools/gnulib/error.c [] []
/src/liblouis/tools/gnulib/basename-lgpl.c [] []
/src/liblouis/gnulib/strncasecmp.c [] []
/src/liblouis/tools/gnulib/fstat.c [] []
/src/liblouis/gnulib/stdckdint.in.h [] []
/src/liblouis/tools/gnulib/getopt.c [] []
/src/liblouis/tools/gnulib/unistr.in.h [] []
/src/liblouis/gnulib/strnlen.c [] []
/src/liblouis/gnulib/stdint.in.h [] []
/src/liblouis/gnulib/xalloc-oversized.h [] []
/src/liblouis/tools/gnulib/stat-w32.c [] []
/src/liblouis/tools/gnulib/msvc-nothrow.c [] []
/src/liblouis/tools/gnulib/unistr/u32-to-u8.c [] []
/src/liblouis/liblouis/pattern.c [] []
/src/liblouis/tools/gnulib/getprogname.c [] []
/src/liblouis/gnulib/strcasecmp.c [] []
/src/liblouis/tools/gnulib/getopt-cdefs.in.h [] []
/src/liblouis/tools/gnulib/intprops.h [] []
/src/liblouis/tools/gnulib/version-etc.c [] []
/src/liblouis/tools/gnulib/stat-time.h [] []
/src/liblouis/gnulib/strndup.c [] []
/src/liblouis/tools/gnulib/getdtablesize.c [] []
/src/liblouis/liblouis/internal.h [] []
/src/liblouis/gnulib/stdlib.in.h [] []
/src/liblouis/tools/gnulib/sys_stat.in.h [] []
/src/liblouis/tools/gnulib/stat.c [] []
/src/liblouis/tools/gnulib/unistr/u8-uctomb-aux.c [] []
/src/liblouis/tools/lou_translate.c [] []
/src/liblouis/gnulib/wchar.in.h [] []
/src/liblouis/tests/logging.c ['tests/fuzzing/fuzz_translate.c', 'tests/fuzzing/fuzz_translate_generic.c', 'tests/fuzzing/fuzz_backtranslate.c'] []
/src/liblouis/tools/gnulib/unistr/u8-uctomb.c [] []
/src/liblouis/tools/gnulib/cloexec.c [] []
/src/liblouis/tests/fuzzing/fuzz_translate.c ['tests/fuzzing/fuzz_translate.c'] []
/src/liblouis/tools/gnulib/getopt1.c [] []
/src/liblouis/tests/fuzzing/table_fuzzer.cc ['tests/fuzzing/table_fuzzer.cc'] []
/src/liblouis/extra/generate-display-names/generate.c [] []
/src/liblouis/tests/check_metadata.c [] []
/src/liblouis/liblouis/lou_translateString.c [] []
/src/liblouis/tools/gnulib/gettext.h [] []
/src/liblouis/tools/gnulib/stdio.in.h [] []
/src/liblouis/tools/gnulib/progname.c [] []
/src/liblouis/liblouis/commonTranslationFunctions.c [] []
/src/liblouis/liblouis/maketable.c [] []
/src/liblouis/gnulib/dirent.in.h [] []
/src/liblouis/tools/lou_trace.c [] []
/src/liblouis/tools/lou_checktable.c [] []
/src/liblouis/tools/brl_checks.c [] []
/src/liblouis/gnulib/intprops-internal.h [] []
/src/liblouis/tests/fuzzing/fuzz_translate_generic.c ['tests/fuzzing/fuzz_translate_generic.c'] []
/src/liblouis/gnulib/malloc.c [] []
/src/liblouis/gnulib/warn-on-use.h [] []
/src/liblouis/tools/gnulib/error.in.h [] []
/src/liblouis/tools/lou_debug.c [] []
/src/liblouis/gnulib/verify.h [] []
/src/liblouis/gnulib/malloca.c [] []
/src/liblouis/gnulib/setenv.c [] []
/src/liblouis/gnulib/malloca.h [] []
/src/liblouis/tools/gnulib/fcntl.c [] []
/src/liblouis/liblouis/logging.c [] []
/src/liblouis/tools/gnulib/msvc-inval.c [] []
/src/liblouis/tools/gnulib/open.c [] []
/src/liblouis/tools/gnulib/dup2.c [] []
/src/liblouis/gnulib/arg-nonnull.h [] []
/src/liblouis/gnulib/unistd.in.h [] []
/src/liblouis/liblouis/lou_backTranslateString.c [] []
/src/liblouis/gnulib/stddef.in.h [] []
/src/liblouis/tests/emphclass.c [] []
/src/liblouis/gnulib/limits.in.h [] []
/src/liblouis/tools/gnulib/attribute.h [] []
/src/liblouis/tests/resolve_table.c [] []
/src/liblouis/tools/lou_checkyaml.c [] []
/src/liblouis/liblouis/compileTranslationTable.c [] []
/src/liblouis/liblouis/metadata.c [] []
/src/liblouis/tools/lou_allround.c [] []
/src/liblouis/gnulib/c++defs.h [] []
/src/liblouis/tests/suggestChunks.c [] []
/src/liblouis/liblouis/utils.c [] []
/src/liblouis/tools/gnulib/getopt-pfx-ext.h [] []
/src/liblouis/tools/gnulib/unistr/u16-mbtoucr.c [] []
/src/liblouis/gnulib/realloc.c [] []
/src/liblouis/tests/fuzzing/fuzz_backtranslate.c ['tests/fuzzing/fuzz_backtranslate.c'] []
/src/liblouis/tools/brl_checks.h [] []

Directories in report

Directory
/src/liblouis/tests/
/src/liblouis/tests/fuzzing/
/src/liblouis/extra/generate-display-names/
/src/liblouis/tools/gnulib/
/src/liblouis/gnulib/
/src/liblouis/tools/gnulib/unistr/
/src/liblouis/tools/
/src/liblouis/liblouis/

Sink analyser for CWEs

This section contains multiple tables, each table contains a list of sink functions/methods found in the project for one of the CWE supported by the sink analyser, together with information like which fuzzers statically reach the sink functions/methods and possible call path to that sink functions/methods if it is not statically reached by any fuzzers. Column 1 is the function/method name of the sink functions/methods found in the project. Column 2 lists all fuzzers (or no fuzzers at all) that have covered that particular function method statically. Column 3 shows a list of possible call paths to reach the specific function/method call if none of the fuzzers cover the target function/method calls. Lastly, column 4 shows possible fuzzer blockers that prevent an existing fuzzer from reaching the target sink functions/methods dynamically.

Sink functions/methods found for CWE79

Target sink Reached by fuzzer Function call path Possible branch blockers
putc [] Path 1
Path 2

N/A

Sink functions/methods found for CWE787

Target sink Reached by fuzzer Function call path Possible branch blockers
strndup ['/src/liblouis/tests/fuzzing/fuzz_translate.c', '/src/liblouis/tests/fuzzing/fuzz_translate_generic.c', '/src/liblouis/tests/fuzzing/fuzz_backtranslate.c'] N/A
Blocker function Arguments type Return type Constants touched
read_table
in /src/liblouis/tools/lou_checkyaml.c:295
['yaml_event_t*', 'yaml_parser_t*', 'char*'] char []
read_tests
in /src/liblouis/tools/lou_checkyaml.c:919
['yaml_parser_t*', 'char**', 'char*', 'int'] void []
putc [] Path 1
Path 2

N/A

Sink functions/methods found for CWE22

Target sink Reached by fuzzer Function call path Possible branch blockers
open [] Path 1
Path 2

N/A