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

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
fuse_main_real_versioned /src/libfuse/lib/helper.c 6 ['int', 'char*[]', 'struct fuse_operations*', 'size_t', 'struct libfuse_version*', 'void*'] 13 0 75 13 21 269 3 568 478
mount_fuse /src/libfuse/util/fusermount.c 3 ['char*', 'char*', 'char**'] 5 0 61 13 20 66 0 165 164
_do_init /src/libfuse/lib/fuse_lowlevel.c 4 ['fuse_req_t', 'fuse_ino_t', 'void*', 'void*'] 7 0 243 81 88 69 1 133 112
fuse_lib_create /src/libfuse/lib/fuse.c 5 ['fuse_req_t', 'fuse_ino_t', 'char*', 'mode_t', 'struct fuse_file_info*'] 11 0 36 10 10 135 0 174 87
cxxopts::ParseResult::parse /src/libfuse/example/cxxopts.hpp 2 ['int', 'char**'] 8 0 77 18 33 27 6 79 79
do_test_open /src/libfuse/test/test_syscalls.c 4 ['int', 'int', 'char*', 'int'] 4 0 133 36 46 28 0 78 78
unmount_fuse_locked /src/libfuse/util/fusermount.c 3 ['char*', 'int', 'int'] 4 0 34 8 9 45 0 71 67
fuse_lib_rename /src/libfuse/lib/fuse.c 6 ['fuse_req_t', 'fuse_ino_t', 'char*', 'fuse_ino_t', 'char*', 'unsigned int'] 10 0 21 6 7 109 0 166 62
lo_do_readdir /src/libfuse/example/passthrough_ll.c 6 ['fuse_req_t', 'fuse_ino_t', 'size_t', 'off_t', 'struct fuse_file_info*', 'int'] 8 0 61 12 18 61 2 69 48
fuse_mount_sys /src/libfuse/lib/mount.c 3 ['char*', 'struct mount_opts*', 'char*'] 5 0 82 18 28 44 0 63 45

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

Functions statically reachable by fuzzers
25.0%
328 / 1319
Cyclomatic complexity statically reachable by fuzzers
38.0%
1286 / 3408

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

helper.c

Target file: /src/libfuse/lib/helper.c
Target functions: fuse_main_real_versioned
#include "ada_fuzz_header.h"

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

  /* target fuse_main_real_versioned */
  int new_var0 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_1;
  structfuse_operations* new_var2 = calloc(sizeof(structfuse_operations), 1);
  UNKNOWN_TYPE unknown_3;
  structlibfuse_version* new_var4 = calloc(sizeof(structlibfuse_version), 1);
  UNKNOWN_TYPE unknown_5;
  fuse_main_real_versioned(new_var0, unknown_1, new_var2, unknown_3, new_var4, unknown_5);

  af_safe_gb_cleanup();
}

fusermount.c

Target file: /src/libfuse/util/fusermount.c
Target functions: mount_fuse, unmount_fuse_locked
#include "ada_fuzz_header.h"

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

  /* target mount_fuse */
  char *new_var6 = ada_safe_get_char_p();
  char *new_var7 = ada_safe_get_char_p();
  char **new_var8 = af_get_double_char_p();
  mount_fuse(new_var6, new_var7, new_var8);

  /* target unmount_fuse_locked */
  char *new_var24 = ada_safe_get_char_p();
  int new_var25 = ada_safe_get_int();
  int new_var26 = ada_safe_get_int();
  unmount_fuse_locked(new_var24, new_var25, new_var26);

  af_safe_gb_cleanup();
}

fuse_lowlevel.c

Target file: /src/libfuse/lib/fuse_lowlevel.c
Target functions: _do_init
#include "ada_fuzz_header.h"

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

  /* target _do_init */
  UNKNOWN_TYPE unknown_9;
  UNKNOWN_TYPE unknown_10;
  UNKNOWN_TYPE unknown_11;
  UNKNOWN_TYPE unknown_12;
  _do_init(unknown_9, unknown_10, unknown_11, unknown_12);

  af_safe_gb_cleanup();
}

fuse.c

Target file: /src/libfuse/lib/fuse.c
Target functions: fuse_lib_create, fuse_lib_rename
#include "ada_fuzz_header.h"

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

  /* target fuse_lib_create */
  UNKNOWN_TYPE unknown_13;
  UNKNOWN_TYPE unknown_14;
  char *new_var15 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_16;
  structfuse_file_info* new_var17 = calloc(sizeof(structfuse_file_info), 1);
  fuse_lib_create(unknown_13, unknown_14, new_var15, unknown_16, new_var17);

  /* target fuse_lib_rename */
  UNKNOWN_TYPE unknown_27;
  UNKNOWN_TYPE unknown_28;
  char *new_var29 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_30;
  char *new_var31 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_32;
  fuse_lib_rename(unknown_27, unknown_28, new_var29, unknown_30, new_var31, unknown_32);

  af_safe_gb_cleanup();
}

cxxopts.hpp

Target file: /src/libfuse/example/cxxopts.hpp
Target functions: cxxopts::ParseResult::parse
#include "ada_fuzz_header.h"

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

  /* target cxxopts::ParseResult::parse */
  int new_var18 = ada_safe_get_int();
  char **new_var19 = af_get_double_char_p();
  cxxopts::ParseResult::parse(new_var18, new_var19);

  af_safe_gb_cleanup();
}

test_syscalls.c

Target file: /src/libfuse/test/test_syscalls.c
Target functions: do_test_open
#include "ada_fuzz_header.h"

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

  /* target do_test_open */
  int new_var20 = ada_safe_get_int();
  int new_var21 = ada_safe_get_int();
  char *new_var22 = ada_safe_get_char_p();
  int new_var23 = ada_safe_get_int();
  do_test_open(new_var20, new_var21, new_var22, new_var23);

  af_safe_gb_cleanup();
}

passthrough_ll.c

Target file: /src/libfuse/example/passthrough_ll.c
Target functions: lo_do_readdir
#include "ada_fuzz_header.h"

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

  /* target lo_do_readdir */
  UNKNOWN_TYPE unknown_33;
  UNKNOWN_TYPE unknown_34;
  UNKNOWN_TYPE unknown_35;
  UNKNOWN_TYPE unknown_36;
  structfuse_file_info* new_var37 = calloc(sizeof(structfuse_file_info), 1);
  int new_var38 = ada_safe_get_int();
  lo_do_readdir(unknown_33, unknown_34, unknown_35, unknown_36, new_var37, new_var38);

  af_safe_gb_cleanup();
}

mount.c

Target file: /src/libfuse/lib/mount.c
Target functions: fuse_mount_sys
#include "ada_fuzz_header.h"

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

  /* target fuse_mount_sys */
  char *new_var39 = ada_safe_get_char_p();
  structmount_opts* new_var40 = calloc(sizeof(structmount_opts), 1);
  char *new_var41 = ada_safe_get_char_p();
  fuse_mount_sys(new_var39, new_var40, new_var41);

  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/libfuse/example/passthrough_hp.cc [] []
/src/libfuse/example/hello.c [] []
/src/libfuse/util/fusermount.c [] []
/src/libfuse/example/passthrough_ll.c [] []
/src/libfuse/example/cxxopts.hpp [] []
/src/libfuse/lib/fuse_loop.c [] []
/src/libfuse/lib/fuse_signals.c [] []
/src/libfuse/example/passthrough.c [] []
/src/libfuse/lib/util.h [] []
/src/libfuse/lib/modules/subdir.c [] []
/src/libfuse/example/memfs_ll.cc [] []
/src/libfuse/lib/mount_util.c [] []
/src/libfuse/util/mount.fuse.c [] []
/src/libfuse/test/stracedecode.c [] []
/src/libfuse/example/notify_inval_inode.c [] []
/src/libfuse/lib/fuse_misc.h [] []
/src/libfuse/lib/buffer.c [] []
/src/libfuse/lib/mount_bsd.c [] []
/src/libfuse/test/test_write_cache.c [] []
/src/libfuse/lib/util.c [] []
/src/libfuse/example/null.c [] []
/src/libfuse/example/ioctl.c [] []
/src/libfuse/test/test_syscalls.c [] []
/src/libfuse/example/notify_store_retrieve.c [] []
/src/libfuse/lib/modules/iconv.c [] []
/src/libfuse/lib/compat.c [] []
/src/libfuse/test/test_want_conversion.c [] []
/src/libfuse/include/fuse_lowlevel.h [] []
/src/libfuse/lib/mount.c [] []
/src/libfuse/example/passthrough_fh.c [] []
/src/fuzz-headers/lang/c/ada_fuzz_header.h ['fuzz_optparse.c'] []
/src/libfuse/lib/fuse_i.h [] []
/src/libfuse/lib/fuse_log.c ['fuzz_optparse.c'] []
/src/libfuse/example/invalidate_path.c [] []
/src/libfuse/lib/cuse_lowlevel.c [] []
/src/libfuse/example/hello_ll.c [] []
/src/libfuse/lib/fuse_lowlevel.c [] []
/src/libfuse/lib/fuse_uring.c [] []
/src/libfuse/example/cuse_client.c [] []
/src/libfuse/test/test_setattr.c [] []
/src/libfuse/example/printcap.c [] []
/src/libfuse/example/notify_inval_entry.c [] []
/src/libfuse/include/fuse.h [] []
/src/libfuse/example/passthrough_helpers.h [] []
/src/libfuse/lib/fuse_opt.c ['fuzz_optparse.c'] []
/src/libfuse/include/fuse_common.h [] []
/src/libfuse/example/poll.c [] []
/src/libfuse/lib/usdt.h [] []
/src/libfuse/include/fuse_opt.h [] []
/src/libfuse/lib/fuse_loop_mt.c [] []
/src/libfuse/example/hello_ll_uds.c [] []
/src/fuzz_optparse.c ['fuzz_optparse.c'] []
/src/libfuse/example/cuse.c [] []
/src/libfuse/include/fuse_kernel.h [] []
/src/libfuse/lib/fuse.c [] []
/src/libfuse/lib/helper.c [] []
/src/libfuse/test/test_signals.c [] []

Directories in report

Directory
/src/libfuse/example/
/src/libfuse/lib/modules/
/src/libfuse/include/
/src/fuzz-headers/lang/c/
/src/
/src/libfuse/util/
/src/libfuse/test/
/src/libfuse/lib/