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: fuzz_optparse

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 22 21.7%
gold [1:9] 8 7.92%
yellow [10:29] 1 0.99%
greenyellow [30:49] 2 1.98%
lawngreen 50+ 68 67.3%
All colors 101 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
7 55 next_arg call site: 00055 process_opt
3 67 process_opt_param call site: 00067
2 21 fuse_opt_add_arg call site: 00021
2 27 fuse_opt_add_arg call site: 00027
2 52 process_gopt call site: 00052 process_opt_sep_arg
2 94 af_gb_cleanup call site: 00094
1 31 process_one call site: 00031
1 37 add_opt_common call site: 00037
1 41 process_option_group call site: 00041
1 65 process_opt_param call site: 00065

Runtime coverage analysis

Covered functions
32
Functions that are reachable but not covered
24
Reachable functions
55
Percentage of reachable functions covered
56.36%
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
fuzz_optparse.c 9
fuzz-headers/lang/c/ada_fuzz_header.h 10
libfuse/lib/fuse_opt.c 35
libfuse/lib/fuse_log.c 3

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 267 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 240 80 87 63 1 124 104
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 173 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 165 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 68 48
fuse_uring_thread /src/libfuse/lib/fuse_uring.c 1 ['void*'] 10 0 29 4 7 77 0 83 46

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

Functions statically reachable by fuzzers
25.0%
335 / 1319
Cyclomatic complexity statically reachable by fuzzers
38.0%
1279 / 3397

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();
}

fuse_uring.c

Target file: /src/libfuse/lib/fuse_uring.c
Target functions: fuse_uring_thread
#include "ada_fuzz_header.h"

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

  /* target fuse_uring_thread */
  UNKNOWN_TYPE unknown_39;
  fuse_uring_thread(unknown_39);

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

Directories in report

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