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
test_async_polling /src/hiredis/test.c 1 ['struct config'] 17 0 68 3 12 251 0 931 931
ffc_adjusted_mantissa::ffc_digit_comp /src/hiredis/ffc.h 3 ['ffc_parsed', 'ffc_adjusted_mantissa', 'ffc_value_kind'] 10 0 9 2 1 82 0 128 116
test_blocking_connection /src/hiredis/test.c 1 ['struct config'] 17 0 58 2 16 247 0 905 112
redisSSLAsyncRead /src/hiredis/ssl.c 1 ['redisAsyncContext*'] 13 0 20 5 4 151 0 580 47
sdssplitargs /src/hiredis/sds.c 2 ['char*', 'int*'] 4 0 116 32 45 22 0 91 46
ffc_parse_json_number /src/hiredis/ffc.h 3 ['char*', 'char*', 'ffc_json_number*'] 4 0 27 6 6 39 0 190 41
redisCreateSSLContextWithOptions /src/hiredis/ssl.c 2 ['redisSSLOptions*', 'redisSSLContextError*'] 3 0 82 23 37 28 1 41 40

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

Functions statically reachable by fuzzers
48.0%
304 / 637
Cyclomatic complexity statically reachable by fuzzers
66.0%
1333 / 2011

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

test.c

Target file: /src/hiredis/test.c
Target functions: test_async_polling, test_blocking_connection
#include "ada_fuzz_header.h"

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

  /* target test_async_polling */
  UNKNOWN_TYPE unknown_0;
  test_async_polling(unknown_0);

  /* target test_blocking_connection */
  UNKNOWN_TYPE unknown_4;
  test_blocking_connection(unknown_4);

  af_safe_gb_cleanup();
}

ffc.h

Target file: /src/hiredis/ffc.h
Target functions: ffc_adjusted_mantissa::ffc_digit_comp, ffc_parse_json_number
#include "ada_fuzz_header.h"

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

  /* target ffc_adjusted_mantissa::ffc_digit_comp */
  UNKNOWN_TYPE unknown_1;
  UNKNOWN_TYPE unknown_2;
  UNKNOWN_TYPE unknown_3;
  ffc_adjusted_mantissa::ffc_digit_comp(unknown_1, unknown_2, unknown_3);

  /* target ffc_parse_json_number */
  char *new_var8 = ada_safe_get_char_p();
  char *new_var9 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_10;
  ffc_parse_json_number(new_var8, new_var9, unknown_10);

  af_safe_gb_cleanup();
}

ssl.c

Target file: /src/hiredis/ssl.c
Target functions: redisSSLAsyncRead, redisCreateSSLContextWithOptions
#include "ada_fuzz_header.h"

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

  /* target redisSSLAsyncRead */
  UNKNOWN_TYPE unknown_5;
  redisSSLAsyncRead(unknown_5);

  /* target redisCreateSSLContextWithOptions */
  UNKNOWN_TYPE unknown_11;
  UNKNOWN_TYPE unknown_12;
  redisCreateSSLContextWithOptions(unknown_11, unknown_12);

  af_safe_gb_cleanup();
}

sds.c

Target file: /src/hiredis/sds.c
Target functions: sdssplitargs
#include "ada_fuzz_header.h"

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

  /* target sdssplitargs */
  char *new_var6 = ada_safe_get_char_p();
  int *new_var7 = af_get_int_p();
  sdssplitargs(new_var6, new_var7);

  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/hiredis/sockcompat.c [] []
/src/hiredis/examples/example.c [] []
/src/hiredis/ssl.c [] []
/src/hiredis/adapters/ae.h [] []
/src/hiredis/hiredis.h [] []
/src/hiredis/examples/example-push.c [] []
/src/hiredis/adapters/libsdevent.h [] []
/src/hiredis/win32.h [] []
/src/hiredis/examples/example-qt.h [] []
/src/hiredis/adapters/redismoduleapi.h [] []
/src/hiredis/examples/example-qt.cpp [] []
/src/hiredis/adapters/poll.h [] []
/src/hiredis/sockcompat.h [] []
/src/hiredis/adapters/libevent.h [] []
/src/hiredis/read.h [] []
/src/hiredis/sds.h [] []
/src/hiredis/examples/example-ae.c [] []
/src/hiredis/adapters/libhv.h [] []
/src/hiredis/adapters/libuv.h [] []
/src/hiredis/async_private.h [] []
/src/hiredis/dict.h [] []
/src/hiredis/adapters/libev.h [] []
/src/hiredis/examples/example-glib.c [] []
/src/hiredis/sds.c [] []
/src/hiredis/adapters/ivykis.h [] []
/src/hiredis/hiredis.c [] []
/src/hiredis/test.c [] []
/src/hiredis/examples/example-redismoduleapi.c [] []
/src/hiredis/examples/example-libuv.c [] []
/src/hiredis/adapters/macosx.h [] []
/src/hiredis/ffc.h [] []
/src/hiredis/dict.c [] []
/src/hiredis/alloc.c [] []
/src/hiredis/read.c [] []
/src/hiredis/adapters/glib.h [] []
/src/hiredis/net.c [] []
/src/hiredis/async.c [] []
/src/hiredis/adapters/qt.h [] []

Directories in report

Directory
/src/hiredis/
/src/hiredis/adapters/
/src/hiredis/examples/