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 | 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 | 27 | 16.0% |
gold | [1:9] | 5 | 2.97% |
yellow | [10:29] | 10 | 5.95% |
greenyellow | [30:49] | 2 | 1.19% |
lawngreen | 50+ | 124 | 73.8% |
All colors | 168 | 100 |
The following nodes represent call sites where fuzz blockers occur.
Amount of callsites blocked | Calltree index | Parent function | Callsite | Largest blocked function |
---|---|---|---|---|
5 | 99 | parse_image | call site: 00099 | |
4 | 116 | parse_image | call site: 00116 | r_ptr_array_addv |
2 | 3 | fuzz_set_logging_func | call site: 00003 | load_manifest_mem |
2 | 62 | parse_manifest | call site: 00062 | |
2 | 67 | parse_manifest | call site: 00067 | |
2 | 70 | parse_manifest | call site: 00070 | |
2 | 106 | parse_image | call site: 00106 | |
1 | 8 | load_manifest_mem | call site: 00008 | |
1 | 15 | parse_manifest | call site: 00015 | |
1 | 22 | key_file_consume_string | call site: 00022 | |
1 | 60 | parse_manifest | call site: 00060 | |
1 | 78 | r_new_image | call site: 00078 |
Function name | source code lines | source lines hit | percentage hit |
---|
filename | functions hit |
---|---|
fuzz/manifest.c | 1 |
fuzz/fuzz.h | 1 |
src/manifest.c | 5 |
src/utils.c | 4 |
include/utils.h | 1 |
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 | 1449 | 83.8% |
gold | [1:9] | 19 | 1.09% |
yellow | [10:29] | 15 | 0.86% |
greenyellow | [30:49] | 2 | 0.11% |
lawngreen | 50+ | 244 | 14.1% |
All colors | 1729 | 100 |
The following nodes represent call sites where fuzz blockers occur.
Amount of callsites blocked | Calltree index | Parent function | Callsite | Largest blocked function |
---|---|---|---|---|
310 | 1166 | check_bundle | call site: 01166 | cms_verify_fd |
289 | 239 | check_remaining_keys | call site: 00239 | parse_slots |
269 | 542 | default_config | call site: 00542 | r_context_configure_target |
190 | 852 | is_remote_scheme | call site: 00852 | r_nbd_start_server |
178 | 59 | key_file_consume_string | call site: 00059 | r_semver_less_equal |
43 | 1093 | check_bundle | call site: 01093 | r_context |
42 | 1497 | r_context_free_progress_step | call site: 01497 | cms_verify_sig |
18 | 36 | r_context_configure | call site: 00036 | load_config_verbose |
10 | 1481 | r_context_end_step | call site: 01481 | r_context_set_step_percentage |
9 | 530 | check_remaining_groups | call site: 00530 | load_config_verbose |
5 | 12 | signature_init | call site: 00012 | get_openssl_err_string |
5 | 1643 | parse_image | call site: 01643 |
Function name | source code lines | source lines hit | percentage hit |
---|
filename | functions hit |
---|---|
fuzz/bundle.c | 1 |
fuzz/fuzz.h | 1 |
src/context.c | 21 |
src/signature.c | 28 |
src/config_file.c | 8 |
src/utils.c | 19 |
src/bootchooser.c | 2 |
src/install.c | 1 |
src/event_log.c | 2 |
src/slot.c | 1 |
src/artifacts.c | 1 |
src/status_file.c | 1 |
src/bootloaders/custom.c | 1 |
include/utils.h | 3 |
src/bootloaders/efi.c | 3 |
src/bootloaders/barebox.c | 1 |
src/bundle.c | 10 |
src/nbd.c | 5 |
src/network.c | 2 |
src/manifest.c | 5 |
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
install_test_bundle
|
/src/rauc/test/install.c | 2 | ['InstallFixture*', 'gconstpointer'] | 9 | 0 | 58 | 5 | 16 | 642 | 1 | 3552 | 1921 |
fixture_helper_set_up_bundle
|
/src/rauc/test/install_fixtures.c | 3 | ['gchar*', 'gchar*', 'ManifestTestOptions*'] | 11 | 0 | 78 | 9 | 19 | 468 | 10 | 2242 | 877 |
status_start
|
/src/rauc/src/main.c | 2 | ['int', 'char**'] | 10 | 0 | 115 | 22 | 31 | 362 | 0 | 1955 | 566 |
img_to_fs_handler
|
/src/rauc/src/update_handler.c | 4 | ['RaucImage*', 'RaucSlot*', 'gchar*', 'GError**'] | 14 | 0 | 26 | 8 | 17 | 292 | 0 | 1366 | 413 |
cgi_handler
|
/src/rauc/contrib/cgi/src/cgi.c | 2 | ['int', 'char**'] | 4 | 0 | 51 | 17 | 31 | 75 | 1 | 214 | 214 |
convert_start
|
/src/rauc/src/main.c | 2 | ['int', 'char**'] | 17 | 0 | 39 | 9 | 19 | 480 | 0 | 2377 | 189 |
img_to_boot_mbr_switch_handler
|
/src/rauc/src/update_handler.c | 4 | ['RaucImage*', 'RaucSlot*', 'gchar*', 'GError**'] | 13 | 0 | 60 | 11 | 27 | 230 | 0 | 1038 | 168 |
test_update_handler
|
/src/rauc/test/update_handler.c | 2 | ['UpdateHandlerFixture*', 'gconstpointer'] | 10 | 0 | 327 | 37 | 63 | 258 | 0 | 1085 | 166 |
r_nbd_run_server
|
/src/rauc/src/nbd.c | 2 | ['gint', 'GError**'] | 5 | 0 | 141 | 15 | 33 | 78 | 1 | 203 | 161 |
info_start
|
/src/rauc/src/main.c | 2 | ['int', 'char**'] | 13 | 0 | 97 | 19 | 35 | 457 | 0 | 2118 | 143 |
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 | 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=['parse_image', 'fuzz_set_logging_func', 'parse_manifest', 'load_manifest_mem', 'key_file_consume_string']
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=['check_bundle', 'check_remaining_keys', 'default_config', 'is_remote_scheme', 'key_file_consume_string', 'r_context_free_progress_step', 'r_context_configure', 'r_context_end_step', 'check_remaining_groups']
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 |
---|---|---|---|---|
read_aliases | 36 | 6 | 16.66% | |
g_checksum_update | 32 | 12 | 37.5% | |
g_checksum_get_string | 34 | 14 | 41.17% | |
g_string_insert_len | 51 | 23 | 45.09% | |
g_unichar_to_utf8 | 45 | 16 | 35.55% | |
check_type_info_I | 71 | 22 | 30.98% | |
check_value_table_I | 54 | 19 | 35.18% | |
check_derivation_I | 36 | 12 | 33.33% | |
type_data_ref_Wm | 32 | 8 | 25.0% | |
OPENSSL_cpuid_setup | 42 | 15 | 35.71% | |
check_bundle | 175 | 85 | 48.57% | ['/src/rauc/fuzz/bundle.c'] |
r_context_configure | 63 | 24 | 38.09% | ['/src/rauc/fuzz/bundle.c'] |
cms_get_unverified_manifest | 57 | 29 | 50.87% | ['/src/rauc/fuzz/bundle.c'] |
matcher_optimize | 33 | 12 | 36.36% | |
g_io_error_from_errno | 129 | 7 | 5.426% | |
g_io_error_from_file_error | 51 | 7 | 13.72% | |
g_io_modules_scan_all_in_directory_with_scope | 95 | 12 | 12.63% | |
_g_io_module_get_default | 95 | 51 | 53.68% | |
get_xattrs_from_fd | 89 | 19 | 21.34% | |
sandbox_info_read | 51 | 18 | 35.29% | |
g_convert_with_iconv | 99 | 50 | 50.50% | |
convert_checked | 39 | 12 | 30.76% | |
g_data_set_internal | 102 | 39 | 38.23% | |
g_file_test | 38 | 13 | 34.21% | |
g_file_error_from_errno | 103 | 9 | 8.737% | |
g_file_set_contents_full | 81 | 26 | 32.09% | |
write_to_file | 46 | 25 | 54.34% | |
rename_file | 33 | 8 | 24.24% | |
g_get_tmp_name | 55 | 20 | 36.36% | |
g_logv | 96 | 51 | 53.12% | |
msort_r | 71 | 26 | 36.61% | |
msort_with_tmp | 117 | 9 | 7.692% | |
g_close | 32 | 6 | 18.75% | |
_g_locale_get_charset_aliases | 92 | 32 | 34.78% | |
g_object_unref | 87 | 44 | 50.57% | |
object_interface_check_properties | 77 | 15 | 19.48% | |
g_object_new_internal | 47 | 14 | 29.78% | |
g_signal_handlers_destroy | 33 | 8 | 24.24% | |
signal_id_lookup | 41 | 22 | 53.65% | |
g_type_interface_add_prerequisite | 64 | 31 | 48.43% | |
check_add_interface_L | 64 | 27 | 42.18% | |
type_check_is_value_type_U | 32 | 16 | 50.0% | |
ossl_i2c_ASN1_BIT_STRING | 50 | 25 | 50.0% | |
BIO_new_ex | 31 | 14 | 45.16% | |
BIO_gets | 40 | 21 | 52.5% | |
_dopr | 265 | 106 | 40.0% | |
doapr_outch | 38 | 10 | 26.31% | |
file_ctrl | 102 | 18 | 17.64% | |
mem_ctrl | 92 | 32 | 34.78% | |
def_load_bio | 313 | 122 | 38.97% | |
str_copy | 129 | 64 | 49.61% | |
CONF_modules_load | 50 | 15 | 30.0% | |
d2i_DHxparams | 34 | 12 | 35.29% | |
dh_new_intern | 47 | 21 | 44.68% | |
dsa_new_intern | 48 | 22 | 45.83% | |
ossl_ec_key_new_method_int | 54 | 22 | 40.74% | |
ossl_ecx_key_op | 63 | 11 | 17.46% | |
ossl_decoder_instance_new | 49 | 25 | 51.02% | |
collect_decoder | 56 | 29 | 51.78% | |
ossl_engine_table_select | 74 | 11 | 14.86% | |
get_error_values | 60 | 26 | 43.33% | |
evp_pkey_get_legacy | 33 | 7 | 21.21% | |
ossl_crypto_new_ex_data_ex | 40 | 21 | 52.5% | |
init_thread_deregister | 48 | 20 | 41.66% | |
OSSL_PARAM_set_int32 | 48 | 14 | 29.16% | |
provider_activate | 42 | 21 | 50.0% | |
provider_init | 154 | 52 | 33.76% | |
ossl_rsa_todata | 39 | 19 | 48.71% | |
ossl_ifc_ffc_compute_security_bits | 39 | 21 | 53.84% | |
rsa_new_intern | 49 | 23 | 46.93% | |
OPENSSL_sk_deep_copy | 37 | 14 | 37.83% | |
X509_PURPOSE_add | 50 | 27 | 54.0% | |
crl_cb | 103 | 37 | 35.92% | |
deflt_query | 32 | 9 | 28.12% |
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 install_test_bundle */
UNKNOWN_TYPE unknown_0;
UNKNOWN_TYPE unknown_1;
install_test_bundle(unknown_0, unknown_1);
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 fixture_helper_set_up_bundle */
UNKNOWN_TYPE unknown_2;
UNKNOWN_TYPE unknown_3;
UNKNOWN_TYPE unknown_4;
fixture_helper_set_up_bundle(unknown_2, unknown_3, unknown_4);
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 status_start */
int new_var5 = ada_safe_get_int();
char **new_var6 = af_get_double_char_p();
status_start(new_var5, new_var6);
/* target convert_start */
int new_var13 = ada_safe_get_int();
char **new_var14 = af_get_double_char_p();
convert_start(new_var13, new_var14);
/* target info_start */
int new_var23 = ada_safe_get_int();
char **new_var24 = af_get_double_char_p();
info_start(new_var23, new_var24);
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 img_to_fs_handler */
UNKNOWN_TYPE unknown_7;
UNKNOWN_TYPE unknown_8;
UNKNOWN_TYPE unknown_9;
UNKNOWN_TYPE unknown_10;
img_to_fs_handler(unknown_7, unknown_8, unknown_9, unknown_10);
/* target img_to_boot_mbr_switch_handler */
UNKNOWN_TYPE unknown_15;
UNKNOWN_TYPE unknown_16;
UNKNOWN_TYPE unknown_17;
UNKNOWN_TYPE unknown_18;
img_to_boot_mbr_switch_handler(unknown_15, unknown_16, unknown_17, unknown_18);
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 cgi_handler */
int new_var11 = ada_safe_get_int();
char **new_var12 = af_get_double_char_p();
cgi_handler(new_var11, new_var12);
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 test_update_handler */
UNKNOWN_TYPE unknown_19;
UNKNOWN_TYPE unknown_20;
test_update_handler(unknown_19, unknown_20);
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 r_nbd_run_server */
UNKNOWN_TYPE unknown_21;
UNKNOWN_TYPE unknown_22;
r_nbd_run_server(unknown_21, unknown_22);
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/rauc/src/mbr.c | [] | [] |
/src/rauc/src/emmc.c | [] | [] |
/src/rauc/test/context.c | [] | [] |
/src/rauc/test/checksum.c | [] | [] |
/src/rauc/src/stats.c | [] | [] |
/src/rauc/include/utils.h | ['fuzz/manifest.c', 'fuzz/bundle.c'] | [] |
/src/rauc/src/bundle.c | ['fuzz/bundle.c'] | ['fuzz/bundle.c'] |
/src/rauc/test/boot_raw_fallback.c | [] | [] |
/src/rauc/src/service.c | [] | [] |
/src/rauc/src/gpt.c | [] | [] |
/src/rauc/test/signature.c | [] | [] |
/src/rauc/test/bundle.c | [] | [] |
/src/rauc/test/slot.c | [] | [] |
/src/rauc/test/dm.c | [] | [] |
/src/rauc/include/manifest.h | [] | [] |
/src/rauc/test/install.c | [] | [] |
/src/rauc/src/hash_index.c | [] | [] |
/src/rauc/test/stats.c | [] | [] |
/src/rauc/src/update_utils.c | [] | [] |
/src/rauc/test/boot_switch.c | [] | [] |
/src/rauc/src/shell.c | [] | [] |
/src/rauc/include/artifacts_composefs.h | [] | [] |
/src/rauc/test/update_handler.c | [] | [] |
/src/rauc/src/update_handler.c | [] | [] |
/src/rauc/test/nbd.c | [] | [] |
/src/rauc/test/artifacts.c | [] | [] |
/src/rauc/src/bootloaders/custom.c | ['fuzz/bundle.c'] | [] |
/src/rauc/src/bootchooser.c | ['fuzz/bundle.c'] | [] |
/src/rauc/src/config_file.c | ['fuzz/bundle.c'] | ['fuzz/bundle.c'] |
/src/rauc/src/mount.c | [] | [] |
/src/rauc/test/config_file.c | [] | [] |
/src/rauc/test/common.c | [] | [] |
/src/rauc/src/crypt.c | [] | [] |
/src/rauc/fuzz/fuzz.h | ['fuzz/manifest.c', 'fuzz/bundle.c'] | ['fuzz/manifest.c', 'fuzz/bundle.c'] |
/src/rauc/fuzz/bundle.c | ['fuzz/bundle.c'] | ['fuzz/bundle.c'] |
/src/rauc/src/status_file.c | ['fuzz/bundle.c'] | [] |
/src/rauc/src/bootloaders/barebox.c | ['fuzz/bundle.c'] | [] |
/src/rauc/src/nbd.c | ['fuzz/bundle.c'] | [] |
/src/rauc/src/slot.c | ['fuzz/bundle.c'] | [] |
/src/rauc/fuzz/localfuzzer.c | [] | [] |
/src/rauc/src/artifacts.c | ['fuzz/bundle.c'] | [] |
/src/rauc/contrib/cgi/src/cgi.c | [] | [] |
/src/rauc/test/event_log.c | [] | [] |
/src/rauc/src/checksum.c | [] | [] |
/src/rauc/include/network.h | [] | [] |
/src/rauc/src/bootloaders/grub.c | [] | [] |
/src/rauc/src/context.c | ['fuzz/bundle.c'] | ['fuzz/bundle.c'] |
/src/rauc/test/manifest.c | [] | [] |
/src/rauc/src/network.c | ['fuzz/bundle.c'] | [] |
/src/rauc/src/install.c | ['fuzz/bundle.c'] | [] |
/src/rauc/src/main.c | [] | [] |
/src/rauc/test/bootchooser.c | [] | [] |
/src/rauc/fuzz/manifest.c | ['fuzz/manifest.c'] | ['fuzz/manifest.c'] |
/src/rauc/src/bootloaders/uboot.c | [] | [] |
/src/rauc/src/utils.c | ['fuzz/manifest.c', 'fuzz/bundle.c'] | ['fuzz/manifest.c', 'fuzz/bundle.c'] |
/src/rauc/test/hash_index.c | [] | [] |
/src/rauc/test/progress.c | [] | [] |
/src/rauc/test/utils.c | [] | [] |
/src/rauc/src/verity_hash.c | [] | [] |
/src/rauc/src/signature.c | ['fuzz/bundle.c'] | ['fuzz/bundle.c'] |
/src/rauc/test/network.c | [] | [] |
/src/rauc/src/bootloaders/efi.c | ['fuzz/bundle.c'] | [] |
/src/rauc/test/status_file.c | [] | [] |
/src/rauc/src/mark.c | [] | [] |
/src/rauc/src/artifacts_composefs.c | [] | [] |
/src/rauc/src/dm.c | [] | [] |
/src/rauc/src/manifest.c | ['fuzz/manifest.c', 'fuzz/bundle.c'] | ['fuzz/manifest.c', 'fuzz/bundle.c'] |
/src/rauc/src/event_log.c | ['fuzz/bundle.c'] | [] |
/src/rauc/test/service.c | [] | [] |
/src/rauc/test/install_fixtures.c | [] | [] |
Directory |
---|
/src/rauc/include/ |
/src/rauc/src/ |
/src/rauc/fuzz/ |
/src/rauc/src/bootloaders/ |
/src/rauc/test/ |
/src/rauc/contrib/cgi/src/ |
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/manifest.c | fuzzerLogFile-1.data | fuzzerLogFile-1.data.yaml | manifest_fuzzer.covreport , bundle_fuzzer.covreport |
fuzz/bundle.c | fuzzerLogFile-0.data | fuzzerLogFile-0.data.yaml | manifest_fuzzer.covreport , bundle_fuzzer.covreport |
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.
Target sink | Reached by fuzzer | Function call path | Possible branch blockers |
---|---|---|---|
copy_file | [] |
Path 1
Path 2 |
N/A |