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 |
---|
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 |
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 |
Function name | source code lines | source lines hit | percentage hit |
---|
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 |
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:
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 |
---|
This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.
Use this with the libFuzzer -dict=DICT.file flag
Use one of these functions as input to libfuzzer with flag: -focus_function name
-focus_function=['next_arg', 'process_opt_param', 'fuse_opt_add_arg', 'process_gopt', 'af_gb_cleanup', 'process_one', 'add_opt_common', 'process_option_group']
This section shows analysis of runtime coverage data.
For futher technical details on how this section is generated, please see the Glossary .
Func name | Function total lines | Lines covered at runtime | percentage covered | Reached by fuzzers |
---|
The below fuzzers are templates and suggestions for how to target the set of optimal functions above
#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();
}
#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();
}
#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();
}
#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();
}
#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();
}
#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();
}
#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();
}
#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();
}
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
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 | [] | [] |
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/ |
This section shows a list of 3rd party function calls and their relative coverage information. By static analysis of the target project code, all of the 3rd party function call and their caller information, including the source file and line number that initiate the call are captured. The caller source code file and line number are shown in column 2 while column 1 is the function name of the 3rd party function call. Each occurrent of the 3rd party function call will occuply a separate row. Column 3 of each row indicate if the 3rd party call in the source file line is unreachable. Column 4 lists all fuzzers that have covered that particular system call in that specific location (source file and line)during their dynamic fuzzing.
Target sink | Callsite location | Reached by fuzzer | Covered by Fuzzers |
---|
This sections shows the raw data that is used to produce this report. This is mainly used for further processing and developer debugging.
Fuzzer | Calltree file | Program data file | Coverage file |
---|---|---|---|
fuzz_optparse | fuzzerLogFile-fuzz_optparse.data | fuzzerLogFile-fuzz_optparse.data.yaml | fuzz_optparse.covreport |