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
install_test_bundle /src/rauc/test/install.c 2 ['InstallFixture*', 'gconstpointer'] 12 0 44 5 5 641 1 1871 968
fixture_helper_set_up_bundle /src/rauc/test/install_fixtures.c 3 ['gchar*', 'gchar*', 'ManifestTestOptions*'] 11 0 52 9 8 465 10 1173 433
status_start /src/rauc/src/main.c 2 ['int', 'char**'] 11 0 107 22 22 366 0 1042 310
img_to_fs_handler /src/rauc/src/update_handler.c 4 ['RaucImage*', 'RaucSlot*', 'gchar*', 'GError**'] 14 0 25 8 10 286 0 731 213
convert_start /src/rauc/src/main.c 2 ['int', 'char**'] 17 0 52 9 15 477 0 1333 109
img_to_boot_gpt_switch_handler /src/rauc/src/update_handler.c 4 ['RaucImage*', 'RaucSlot*', 'gchar*', 'GError**'] 13 0 62 11 19 249 0 585 101
cgi_handler /src/rauc/contrib/cgi/src/cgi.c 2 ['int', 'char**'] 4 0 68 17 23 76 1 99 99
r_nbd_run_server /src/rauc/src/nbd.c 2 ['gint', 'GError**'] 5 0 118 15 23 80 1 116 95
img_to_boot_mbr_switch_handler /src/rauc/src/update_handler.c 4 ['RaucImage*', 'RaucSlot*', 'gchar*', 'GError**'] 13 0 61 11 19 220 0 582 80
test_update_handler /src/rauc/test/update_handler.c 2 ['UpdateHandlerFixture*', 'gconstpointer'] 9 0 217 37 43 262 0 572 79

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

Functions statically reachable by fuzzers
50.0%
483 / 974
Cyclomatic complexity statically reachable by fuzzers
75.0%
3391 / 4498

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

install.c

Target file: /src/rauc/test/install.c
Target functions: install_test_bundle
#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();
}

install_fixtures.c

Target file: /src/rauc/test/install_fixtures.c
Target functions: fixture_helper_set_up_bundle
#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();
}

main.c

Target file: /src/rauc/src/main.c
Target functions: status_start, convert_start
#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_var11 = ada_safe_get_int();
  char **new_var12 = af_get_double_char_p();
  convert_start(new_var11, new_var12);

  af_safe_gb_cleanup();
}

update_handler.c

Target file: /src/rauc/src/update_handler.c
Target functions: img_to_fs_handler, img_to_boot_gpt_switch_handler, img_to_boot_mbr_switch_handler
#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_gpt_switch_handler */
  UNKNOWN_TYPE unknown_13;
  UNKNOWN_TYPE unknown_14;
  UNKNOWN_TYPE unknown_15;
  UNKNOWN_TYPE unknown_16;
  img_to_boot_gpt_switch_handler(unknown_13, unknown_14, unknown_15, unknown_16);

  /* target img_to_boot_mbr_switch_handler */
  UNKNOWN_TYPE unknown_21;
  UNKNOWN_TYPE unknown_22;
  UNKNOWN_TYPE unknown_23;
  UNKNOWN_TYPE unknown_24;
  img_to_boot_mbr_switch_handler(unknown_21, unknown_22, unknown_23, unknown_24);

  af_safe_gb_cleanup();
}

cgi.c

Target file: /src/rauc/contrib/cgi/src/cgi.c
Target functions: cgi_handler
#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_var17 = ada_safe_get_int();
  char **new_var18 = af_get_double_char_p();
  cgi_handler(new_var17, new_var18);

  af_safe_gb_cleanup();
}

nbd.c

Target file: /src/rauc/src/nbd.c
Target functions: r_nbd_run_server
#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_19;
  UNKNOWN_TYPE unknown_20;
  r_nbd_run_server(unknown_19, unknown_20);

  af_safe_gb_cleanup();
}

update_handler.c

Target file: /src/rauc/test/update_handler.c
Target functions: test_update_handler
#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_25;
  UNKNOWN_TYPE unknown_26;
  test_update_handler(unknown_25, unknown_26);

  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/rauc/src/bundle.c ['fuzz/bundle.c'] []
/src/rauc/fuzz/manifest.c ['fuzz/manifest.c'] []
/src/rauc/test/network.c [] []
/src/rauc/src/stats.c [] []
/src/rauc/test/signature.c [] []
/src/rauc/test/common.h [] []
/src/rauc/src/mark.c [] []
/src/rauc/src/bootloaders/uboot.c [] []
/src/rauc/include/manifest.h [] []
/src/rauc/test/context.c [] []
/src/rauc/src/nbd.c ['fuzz/bundle.c'] []
/src/rauc/src/dm.c [] []
/src/rauc/test/hash_index.c [] []
/src/rauc/src/artifacts_composefs.c [] []
/src/rauc/src/bootloaders/efi.c ['fuzz/bundle.c'] []
/src/rauc/test/utils.c [] []
/src/rauc/src/bootchooser.c ['fuzz/bundle.c'] []
/src/rauc/src/event_log.c ['fuzz/bundle.c'] []
/src/rauc/fuzz/localfuzzer.c [] []
/src/rauc/test/progress.c [] []
/src/rauc/src/config_file.c ['fuzz/bundle.c'] []
/src/rauc/src/utils.c ['fuzz/manifest.c', 'fuzz/bundle.c'] []
/src/rauc/src/artifacts.c ['fuzz/bundle.c'] []
/src/rauc/include/network.h [] []
/src/rauc/src/checksum.c [] []
/src/rauc/test/bootchooser.c [] []
/src/rauc/src/signature.c ['fuzz/bundle.c'] []
/src/rauc/test/checksum.c [] []
/src/rauc/src/verity_hash.c [] []
/src/rauc/test/boot_switch.c [] []
/src/rauc/src/gpt.c [] []
/src/rauc/src/install.c ['fuzz/bundle.c'] []
/src/rauc/fuzz/fuzz.h ['fuzz/manifest.c', 'fuzz/bundle.c'] []
/src/rauc/test/event_log.c [] []
/src/rauc/src/shell.c [] []
/src/rauc/src/network.c ['fuzz/bundle.c'] []
/src/rauc/src/slot.c ['fuzz/bundle.c'] []
/src/rauc/src/manifest.c ['fuzz/manifest.c', 'fuzz/bundle.c'] []
/src/rauc/src/status_file.c ['fuzz/bundle.c'] []
/src/rauc/src/update_handler.c [] []
/src/rauc/src/mount.c [] []
/src/rauc/test/nbd.c [] []
/src/rauc/test/artifacts.c [] []
/src/rauc/test/stats.c [] []
/src/rauc/test/install.c [] []
/src/rauc/src/hash_index.c [] []
/src/rauc/test/common.c [] []
/src/rauc/src/crypt.c [] []
/src/rauc/test/manifest.c [] []
/src/rauc/fuzz/bundle.c ['fuzz/bundle.c'] []
/src/rauc/test/dm.c [] []
/src/rauc/test/boot_raw_fallback.c [] []
/src/rauc/test/update_handler.c [] []
/src/rauc/src/bootloaders/grub.c [] []
/src/rauc/test/service.c [] []
/src/rauc/src/service.c [] []
/src/rauc/contrib/cgi/src/cgi.c [] []
/src/rauc/include/utils.h ['fuzz/manifest.c', 'fuzz/bundle.c'] []
/src/rauc/src/mbr.c [] []
/src/rauc/src/bootloaders/barebox.c ['fuzz/bundle.c'] []
/src/rauc/include/emmc.h [] []
/src/rauc/test/config_file.c [] []
/src/rauc/src/emmc.c [] []
/src/rauc/src/context.c ['fuzz/bundle.c'] []
/src/rauc/include/artifacts_composefs.h [] []
/src/rauc/src/update_utils.c [] []
/src/rauc/src/bootloaders/custom.c ['fuzz/bundle.c'] []
/src/rauc/test/status_file.c [] []
/src/rauc/src/main.c [] []
/src/rauc/test/bundle.c [] []
/src/rauc/test/slot.c [] []
/src/rauc/test/install_fixtures.c [] []

Directories in report

Directory
/src/rauc/src/bootloaders/
/src/rauc/include/
/src/rauc/src/
/src/rauc/fuzz/
/src/rauc/test/
/src/rauc/contrib/cgi/src/