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: augeas_fa_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.

Fuzzer: augeas_escape_name_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.

Fuzzer: augeas_api_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
testRemoveNoPermission /src/augeas/tests/test-save.c 1 ['CuTest*'] 26 0 14 2 1 755 0 2815 391
lns_check_rec /src/augeas/src/lens.c 4 ['struct info*', 'struct lens*', 'struct lens*', 'int'] 27 0 52 7 13 322 1 1219 135
check_exp /src/augeas/src/syntax.c 2 ['struct term*', 'struct ctx*'] 29 0 97 27 31 368 6 1506 105
run_tests /src/augeas/tests/test-xpath.c 3 ['struct test*', 'int', 'char**'] 27 0 37 15 15 725 0 2786 88
run_args /src/augeas/src/augtool.c 2 ['int', 'char**'] 7 0 22 6 9 52 0 125 88
split_path /src/augeas/src/augprint.c 1 ['struct augeas_path_value*'] 3 0 20 2 2 16 0 87 86
lns_make_square /src/augeas/src/lens.c 5 ['struct info*', 'struct lens*', 'struct lens*', 'struct lens*', 'int'] 25 0 38 5 10 254 1 1020 70
output_path /src/augeas/src/augprint.c 1 ['struct augeas_path_value*'] 3 0 10 2 2 7 1 51 51
cmd_dump_xml /src/augeas/src/augrun.c 1 ['struct command*'] 23 0 7 2 1 253 0 1015 50
func_regexp_flag /src/augeas/src/pathx.c 2 ['struct state*', 'int'] 25 0 6 2 1 104 0 416 49

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

Functions statically reachable by fuzzers
68.0%
845 / 1250
Cyclomatic complexity statically reachable by fuzzers
81.0%
3890 / 4799

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

test-save.c

Target file: /src/augeas/tests/test-save.c
Target functions: testRemoveNoPermission
#include "ada_fuzz_header.h"

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

  /* target testRemoveNoPermission */
  UNKNOWN_TYPE unknown_0;
  testRemoveNoPermission(unknown_0);

  af_safe_gb_cleanup();
}

lens.c

Target file: /src/augeas/src/lens.c
Target functions: lns_check_rec, lns_make_square
#include "ada_fuzz_header.h"

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

  /* target lns_check_rec */
  structinfo* new_var1 = calloc(sizeof(structinfo), 1);
  structlens* new_var2 = calloc(sizeof(structlens), 1);
  structlens* new_var3 = calloc(sizeof(structlens), 1);
  int new_var4 = ada_safe_get_int();
  lns_check_rec(new_var1, new_var2, new_var3, new_var4);

  /* target lns_make_square */
  structinfo* new_var13 = calloc(sizeof(structinfo), 1);
  structlens* new_var14 = calloc(sizeof(structlens), 1);
  structlens* new_var15 = calloc(sizeof(structlens), 1);
  structlens* new_var16 = calloc(sizeof(structlens), 1);
  int new_var17 = ada_safe_get_int();
  lns_make_square(new_var13, new_var14, new_var15, new_var16, new_var17);

  af_safe_gb_cleanup();
}

syntax.c

Target file: /src/augeas/src/syntax.c
Target functions: check_exp
#include "ada_fuzz_header.h"

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

  /* target check_exp */
  structterm* new_var5 = calloc(sizeof(structterm), 1);
  structctx* new_var6 = calloc(sizeof(structctx), 1);
  check_exp(new_var5, new_var6);

  af_safe_gb_cleanup();
}

test-xpath.c

Target file: /src/augeas/tests/test-xpath.c
Target functions: run_tests
#include "ada_fuzz_header.h"

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

  /* target run_tests */
  structtest* new_var7 = calloc(sizeof(structtest), 1);
  int new_var8 = ada_safe_get_int();
  char **new_var9 = af_get_double_char_p();
  run_tests(new_var7, new_var8, new_var9);

  af_safe_gb_cleanup();
}

augtool.c

Target file: /src/augeas/src/augtool.c
Target functions: run_args
#include "ada_fuzz_header.h"

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

  /* target run_args */
  int new_var10 = ada_safe_get_int();
  char **new_var11 = af_get_double_char_p();
  run_args(new_var10, new_var11);

  af_safe_gb_cleanup();
}

augprint.c

Target file: /src/augeas/src/augprint.c
Target functions: split_path, output_path
#include "ada_fuzz_header.h"

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

  /* target split_path */
  structaugeas_path_value* new_var12 = calloc(sizeof(structaugeas_path_value), 1);
  split_path(new_var12);

  /* target output_path */
  structaugeas_path_value* new_var18 = calloc(sizeof(structaugeas_path_value), 1);
  output_path(new_var18);

  af_safe_gb_cleanup();
}

augrun.c

Target file: /src/augeas/src/augrun.c
Target functions: cmd_dump_xml
#include "ada_fuzz_header.h"

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

  /* target cmd_dump_xml */
  structcommand* new_var19 = calloc(sizeof(structcommand), 1);
  cmd_dump_xml(new_var19);

  af_safe_gb_cleanup();
}

pathx.c

Target file: /src/augeas/src/pathx.c
Target functions: func_regexp_flag
#include "ada_fuzz_header.h"

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

  /* target func_regexp_flag */
  structstate* new_var20 = calloc(sizeof(structstate), 1);
  int new_var21 = ada_safe_get_int();
  func_regexp_flag(new_var20, new_var21);

  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/augeas/src/fa.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/tests/cutest.h [] []
/src/augeas/src/augmatch.c ['augeas_api_fuzzer.cc'] []
/src/augeas/src/put.c [] []
/src/augeas_fa_fuzzer.cc ['augeas_fa_fuzzer.cc'] []
/src/augeas/src/get.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/tests/test-perf.c [] []
/src/augeas/src/pathx.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/ref.h [] []
/src/augeas/src/memory.h [] []
/src/augeas/src/ast.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/lens.h [] []
/src/augeas/src/augrun.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/augprint.c [] []
/src/augeas/src/syntax.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/examples/fadot.c [] []
/src/augeas/src/internal.h ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/transform.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/syntax.h [] []
/src/augeas_api_fuzzer.cc ['augeas_api_fuzzer.cc'] []
/src/augeas/src/errcode.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/xml.c [] []
/src/augeas/tests/test-run.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas_escape_name_fuzzer.cc ['augeas_escape_name_fuzzer.cc'] []
/src/augeas/tests/cutest.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/jmt.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/tests/test-save.c [] []
/src/augeas/src/errcode.h [] []
/src/augeas/src/memory.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/regexp.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/examples/dump.c [] []
/src/augeas/src/internal.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/ref.c [] []
/src/augeas/tests/test-xpath.c [] []
/src/augeas/src/lens.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/info.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/tests/fatest.c [] []
/src/augeas/src/builtin.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/list.h [] []
/src/augeas/tests/test-api.c [] []
/src/augeas/src/hash.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/src/augeas.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []
/src/augeas/tests/test-load.c [] []
/src/augeas/src/augtool.c ['augeas_fa_fuzzer.cc', 'augeas_escape_name_fuzzer.cc', 'augeas_api_fuzzer.cc'] []

Directories in report

Directory
/src/augeas/tests/
/src/
/src/augeas/examples/
/src/augeas/src/