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: FuzzServer

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 distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 12 26.0%
gold [1:9] 4 8.69%
yellow [10:29] 5 10.8%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 25 54.3%
All colors 46 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
8 23 addto_syslog call site: 00023 IGNORE
2 14 humanlogtime call site: 00014 strlcpy
1 4 ke_next_record call site: 00004 msyslog
1 41 nts_ke_process_receive call site: 00041 msyslog

Runtime coverage analysis

Covered functions
8
Functions that are reachable but not covered
17
Reachable functions
25
Percentage of reachable functions covered
32.0%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
fuzz/FuzzServer.c 2
ntpd/nts_server.c 4
ntpd/nts.c 1
libntp/msyslog.c 18

Fuzzer: FuzzClient

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 distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 20 22.9%
gold [1:9] 8 9.19%
yellow [10:29] 11 12.6%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 48 55.1%
All colors 87 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
9 25 addto_syslog call site: 00025 msyslog
8 67 socktoa_r call site: 00067 strlcpy
2 16 humanlogtime call site: 00016 strlcpy
1 63 nts_client_process_response_core call site: 00063 strlcpy

Runtime coverage analysis

Covered functions
11
Functions that are reachable but not covered
32
Reachable functions
43
Percentage of reachable functions covered
25.58%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
fuzz/FuzzClient.c 4
ntpd/nts_client.c 15
ntpd/nts.c 2
libntp/msyslog.c 18
libntp/socktoa.c 8

Fuzzer: FuzzExtens

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 distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 145 94.1%
gold [1:9] 1 0.64%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 8 5.19%
All colors 154 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
145 8 extens_server_recv call site: 00008 AES_SIV_Decrypt

Runtime coverage analysis

Covered functions
5
Functions that are reachable but not covered
58
Reachable functions
63
Percentage of reachable functions covered
7.94%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
fuzz/FuzzExtens.c 3
ntpd/nts_extens.c 5
ntpd/nts.c 2
ntpd/nts_cookie.c 9
libntp/msyslog.c 18
libaes_siv/aes_siv.c 28
libaes_siv/tests.c 1

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

Directories in report

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