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/FuzzExtens.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: fuzz/FuzzClient.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

Fuzzer: fuzz/FuzzServer.c

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 project has no code coverage. Will not display blockers as blockers depend on code coverage.

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
configure /src/ntpsec/ntpd/ntp_control.c 2 ['struct recvbuf*', 'int'] 16 0 50 10 11 490 0 1505 1461
jjy_receive /src/ntpsec/ntpd/refclock_jjy.c 1 ['struct recvbuf*'] 12 0 138 31 48 255 0 899 666
input_handler /src/ntpsec/ntpd/ntp_io.c 1 ['fd_set*'] 18 0 50 8 14 370 2 996 307
gpsd_receive /src/ntpsec/ntpd/refclock_gpsd.c 1 ['struct recvbuf*'] 12 0 25 4 7 150 0 400 245
read_variables /src/ntpsec/ntpd/ntp_control.c 2 ['struct recvbuf*', 'int'] 12 0 6 2 1 133 0 296 186
oncore_msg_BaEaHa /src/ntpsec/ntpd/refclock_oncore.c 3 ['struct instance*', 'uint8_t*', 'size_t'] 10 0 212 66 75 83 0 267 168
oncore_start /src/ntpsec/ntpd/refclock_oncore.c 2 ['int', 'struct peer*'] 12 0 89 9 9 101 0 260 160

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

Functions statically reachable by fuzzers
28.0%
678 / 2399
Cyclomatic complexity statically reachable by fuzzers
42.0%
3398 / 8148

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

ntp_control.c

Target file: /src/ntpsec/ntpd/ntp_control.c
Target functions: configure, read_variables
#include "ada_fuzz_header.h"

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

  /* target configure */
  structrecvbuf* new_var0 = calloc(sizeof(structrecvbuf), 1);
  int new_var1 = ada_safe_get_int();
  configure(new_var0, new_var1);

  /* target read_variables */
  structrecvbuf* new_var5 = calloc(sizeof(structrecvbuf), 1);
  int new_var6 = ada_safe_get_int();
  read_variables(new_var5, new_var6);

  af_safe_gb_cleanup();
}

refclock_jjy.c

Target file: /src/ntpsec/ntpd/refclock_jjy.c
Target functions: jjy_receive
#include "ada_fuzz_header.h"

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

  /* target jjy_receive */
  structrecvbuf* new_var2 = calloc(sizeof(structrecvbuf), 1);
  jjy_receive(new_var2);

  af_safe_gb_cleanup();
}

ntp_io.c

Target file: /src/ntpsec/ntpd/ntp_io.c
Target functions: input_handler
#include "ada_fuzz_header.h"

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

  /* target input_handler */
  UNKNOWN_TYPE unknown_3;
  input_handler(unknown_3);

  af_safe_gb_cleanup();
}

refclock_gpsd.c

Target file: /src/ntpsec/ntpd/refclock_gpsd.c
Target functions: gpsd_receive
#include "ada_fuzz_header.h"

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

  /* target gpsd_receive */
  structrecvbuf* new_var4 = calloc(sizeof(structrecvbuf), 1);
  gpsd_receive(new_var4);

  af_safe_gb_cleanup();
}

refclock_oncore.c

Target file: /src/ntpsec/ntpd/refclock_oncore.c
Target functions: oncore_msg_BaEaHa, oncore_start
#include "ada_fuzz_header.h"

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

  /* target oncore_msg_BaEaHa */
  structinstance* new_var7 = calloc(sizeof(structinstance), 1);
  UNKNOWN_TYPE unknown_8;
  UNKNOWN_TYPE unknown_9;
  oncore_msg_BaEaHa(new_var7, unknown_8, unknown_9);

  /* target oncore_start */
  int new_var10 = ada_safe_get_int();
  structpeer* new_var11 = calloc(sizeof(structpeer), 1);
  oncore_start(new_var10, new_var11);

  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/ntpsec/libparse/clk_hopf6021.c [] []
/src/ntpsec/ntpd/ntp_monitor.c [] []
/src/ntpsec/ntpd/ntp_scanner.h [] []
/src/ntpsec/ntpfrob/jitter.c [] []
/src/ntpsec/libntp/prettydate.c [] []
/src/ntpsec/libntp/refidsmear.c [] []
/src/ntpsec/ntpd/refclock_shm.c [] []
/src/ntpsec/libparse/clk_varitext.c [] []
/src/ntpsec/ntpd/nts_cookie.c ['fuzz/FuzzExtens.c'] []
/src/ntpsec/tests/common/sockaddrtest.c [] []
/src/ntpsec/libntp/authreadkeys.c [] []
/src/ntpsec/fuzz/FuzzClient.c ['fuzz/FuzzClient.c'] []
/src/ntpsec/libntp/clocktime.c [] []
/src/ntpsec/include/binio.h [] []
/src/ntpsec/ntpd/ntp_recvbuff.c [] []
/src/ntpsec/include/ntp_stdlib.h [] []
/src/ntpsec/libparse/clk_wharton.c [] []
/src/ntpsec/tests/unity/unity_internals.h [] []
/src/ntpsec/tests/ntpd/leapsec.c [] []
/src/ntpsec/tests/unity/unity_memory.h [] []
/src/ntpsec/ntpd/ntp_sandbox.c [] []
/src/ntpsec/include/ntp_malloc.h [] []
/src/ntpsec/libntp/numtoa.c [] []
/src/ntpsec/include/ntp_types.h [] []
/src/ntpsec/libntp/socket.c [] []
/src/ntpsec/libntp/clockwork.c [] []
/src/ntpsec/include/ntp_config.h [] []
/src/ntpsec/ntpd/refclock_local.c [] []
/src/ntpsec/ntpd/ntp_dns.c [] []
/src/ntpsec/include/ntp_net.h [] []
/src/ntpsec/ntpd/ntp_refclock.c [] []
/src/ntpsec/ntpd/refclock_nmea.c [] []
/src/ntpsec/ntpd/ntp_scanner.c [] []
/src/ntpsec/attic/backwards.c [] []
/src/ntpsec/tests/libntp/authkeys.c [] []
/src/ntpsec/ntpd/refclock_zyfer.c [] []
/src/ntpsec/ntpfrob/main.c [] []
/src/ntpsec/libntp/hextolfp.c [] []
/src/ntpsec/ntpfrob/bumpclock.c [] []
/src/ntpsec/ntpd/ntp_control.c [] []
/src/ntpsec/libntp/socktoa.c ['fuzz/FuzzClient.c'] []
/src/ntpsec/ntpd/refclock_truetime.c [] []
/src/ntpsec/ntpd/ntpd.c [] []
/src/ntpsec/tests/ntpd/restrict.c [] []
/src/ntpsec/tests/common/tests_main.c [] []
/src/ntpsec/ntpd/refclock_hpgps.c [] []
/src/ntpsec/include/ntp_calendar.h [] []
/src/ntpsec/libntp/assert.c [] []
/src/ntpsec/libntp/statestr.c [] []
/src/ntpsec/ntpd/ntp_proto.c [] []
/src/ntpsec/libaes_siv/bench.c [] []
/src/ntpsec/ntpd/ntp_io.c [] []
/src/ntpsec/libaes_siv/tests.c ['fuzz/FuzzExtens.c'] []
/src/ntpsec/ntpd/refclock_jjy.c [] []
/src/ntpsec/ntpd/refclock_spectracom.c [] []
/src/ntpsec/ntptime/ntptime.c [] []
/src/ntpsec/attic/sht.c [] []
/src/ntpsec/libparse/clk_rawdcf.c [] []
/src/ntpsec/ntpd/nts_server.c ['fuzz/FuzzServer.c'] []
/src/ntpsec/attic/exp-timing.c [] []
/src/ntpsec/ntpd/nts.c ['fuzz/FuzzExtens.c', 'fuzz/FuzzClient.c', 'fuzz/FuzzServer.c'] []
/src/ntpsec/libjsmn/test/test.h [] []
/src/ntpsec/include/ntp_syslog.h [] []
/src/ntpsec/libparse/clk_trimtsip.c [] []
/src/ntpsec/libntp/timespecops.c [] []
/src/ntpsec/fuzz/setup.c [] []
/src/ntpsec/ntpd/ntp_config.c [] []
/src/ntpsec/libntp/getopt.c [] []
/src/ntpsec/tests/unity/unity.c [] []
/src/ntpsec/include/parse.h [] []
/src/ntpsec/tests/libntp/decodenetnum.c [] []
/src/ntpsec/tests/ntpd/nts_client.c [] []
/src/ntpsec/libjsmn/example/simple.c [] []
/src/ntpsec/tests/unity/unity_fixture.h [] []
/src/ntpsec/libaes_siv/aes_siv.c ['fuzz/FuzzExtens.c'] []
/src/ntpsec/libntp/lib_strbuf.c [] []
/src/ntpsec/ntpd/ntp_timer.c [] []
/src/ntpsec/libparse/clk_dcf7000.c [] []
/src/ntpsec/libparse/binio.c [] []
/src/ntpsec/ntpfrob/precision.c [] []
/src/ntpsec/ntpfrob/pps-api.c [] []
/src/ntpsec/libparse/data_mbg.c [] []
/src/ntpsec/libntp/syssignal.c [] []
/src/ntpsec/ntpd/ntp_packetstamp.c [] []
/src/ntpsec/attic/digest-timing.c [] []
/src/ntpsec/libntp/strl_obsd.c [] []
/src/ntpsec/include/ntp_fp.h [] []
/src/ntpsec/ntpd/ntp_leapsec.c [] []
/src/ntpsec/ntpd/refclock_modem.c [] []
/src/ntpsec/ntpd/ntp_restrict.c [] []
/src/ntpsec/libparse/clk_meinberg.c [] []
/src/ntpsec/libntp/ssl_init.c [] []
/src/ntpsec/attic/clocks.c [] []
/src/ntpsec/attic/samba/mssntp-blaster.c [] []
/src/ntpsec/attic/samba/fake-samba.c [] []
/src/ntpsec/libntp/ntp_endian.c [] []
/src/ntpsec/ntpd/ntp_util.c [] []
/src/ntpsec/libparse/clk_schmid.c [] []
/src/ntpsec/libntp/authkeys.c [] []
/src/ntpsec/ntpd/nts_extens.c ['fuzz/FuzzExtens.c'] []
/src/ntpsec/libntp/pymodule-mac.c [] []
/src/ntpsec/libntp/systime.c [] []
/src/ntpsec/ntpd/refclock_arbiter.c [] []
/src/ntpsec/ntpd/ntp_loopfilter.c [] []
/src/ntpsec/libparse/ieee754io.c [] []
/src/ntpsec/libjsmn/test/testutil.h [] []
/src/ntpsec/ntpd/refclock_generic.c [] []
/src/ntpsec/include/ntp_debug.h [] []
/src/ntpsec/ntpd/keyword-gen.c [] []
/src/ntpsec/fuzz/FuzzExtens.c ['fuzz/FuzzExtens.c'] []
/src/ntpsec/attic/aead-timing.c [] []
/src/ntpsec/libparse/clk_rcc8000.c [] []
/src/ntpsec/ntpd/ntp_signd.c [] []
/src/ntpsec/include/hack-ancient-openssl.h [] []
/src/ntpsec/attic/sign-timing.c [] []
/src/ntpsec/libntp/python_compatibility.h [] []
/src/ntpsec/libjsmn/jsmn.h [] []
/src/ntpsec/attic/aes-siv-timing.c [] []
/src/ntpsec/tests/unity/unity.h [] []
/src/ntpsec/tests/libntp/refidsmear.c [] []
/src/ntpsec/ntpd/refclock_oncore.c [] []
/src/ntpsec/libparse/gpstolfp.c [] []
/src/ntpsec/libntp/dolfptoa.c [] []
/src/ntpsec/libparse/parse.c [] []
/src/ntpsec/ntpd/refclock_pps.c [] []
/src/ntpsec/tests/unity/unity_fixture.c [] []
/src/ntpsec/libparse/clk_computime.c [] []
/src/ntpsec/include/ntp_assert.h [] []
/src/ntpsec/ntpfrob/dump.c [] []
/src/ntpsec/attic/cipher-find.c [] []
/src/ntpsec/include/ntp_control.h [] []
/src/ntpsec/include/ntpd.h [] []
/src/ntpsec/ntpd/nts_client.c ['fuzz/FuzzClient.c'] []
/src/ntpsec/libaes_siv/demo.c [] []
/src/ntpsec/tests/libntp/ntp_calendar.c [] []
/src/ntpsec/fuzz/FuzzServer.c ['fuzz/FuzzServer.c'] []
/src/ntpsec/libparse/trim_info.c [] []
/src/ntpsec/libntp/decodenetnum.c [] []
/src/ntpsec/ntpd/refclock_gpsd.c [] []
/src/ntpsec/libntp/ntp_calendar.c [] []
/src/ntpsec/libntp/ntp_random.c [] []
/src/ntpsec/tests/libntp/lfptest.h [] []
/src/ntpsec/ntpd/refclock_trimble.c [] []
/src/ntpsec/tests/common/caltime.c [] []
/src/ntpsec/include/ntp.h [] []
/src/ntpsec/include/ntp_syscall.h [] []
/src/ntpsec/libntp/pymodule.c [] []
/src/ntpsec/libjsmn/test/tests.c [] []
/src/ntpsec/include/timespecops.h [] []
/src/ntpsec/libparse/clk_sel240x.c [] []
/src/ntpsec/libntp/initnetwork.c [] []
/src/ntpsec/ntpfrob/tickadj.c [] []
/src/ntpsec/include/ntp_lists.h [] []
/src/ntpsec/libntp/macencrypt.c [] []
/src/ntpsec/attic/kern.c [] []
/src/ntpsec/ntpd/ntp_filegen.c [] []
/src/ntpsec/libjsmn/example/jsondump.c [] []
/src/ntpsec/libntp/emalloc.c [] []
/src/ntpsec/tests/libntp/lfpfunc.c [] []
/src/ntpsec/tests/unity/unity_memory.c [] []
/src/ntpsec/tests/libntp/timespecops.c [] []
/src/ntpsec/ntpd/ntp_peer.c [] []
/src/ntpsec/attic/timestamp-info.c [] []
/src/ntpsec/libntp/msyslog.c ['fuzz/FuzzExtens.c', 'fuzz/FuzzClient.c', 'fuzz/FuzzServer.c'] []
/src/ntpsec/libntp/isc_net.c [] []
/src/ntpsec/libparse/clk_trimtaip.c [] []
/src/ntpsec/attic/random.c [] []
/src/ntpsec/attic/cmac-timing.c [] []
/src/ntpsec/libntp/isc_interfaceiter.c [] []

Directories in report

Directory
/src/ntpsec/libntp/
/src/ntpsec/ntptime/
/src/ntpsec/libjsmn/example/
/src/ntpsec/fuzz/
/src/ntpsec/libparse/
/src/ntpsec/tests/ntpd/
/src/ntpsec/attic/samba/
/src/ntpsec/tests/libntp/
/src/ntpsec/tests/unity/
/src/ntpsec/libaes_siv/
/src/ntpsec/ntpfrob/
/src/ntpsec/tests/common/
/src/ntpsec/attic/
/src/ntpsec/include/
/src/ntpsec/libjsmn/test/
/src/ntpsec/ntpd/
/src/ntpsec/libjsmn/