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_util.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_dhcp.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_auth.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_rfc1035.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_dhcp6.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
dhcp_packet /src/dnsmasq/src/dhcp.c 2 ['time_t', 'int'] 20 0 172 36 66 565 0 5366 2968
one_opt /src/dnsmasq/src/option.c 6 ['int', 'char*', 'char*', 'char*', 'int', 'int'] 13 0 2177 590 810 200 14 2070 1864
async_event /src/dnsmasq/src/dnsmasq.c 2 ['int', 'time_t'] 18 0 119 43 51 415 0 2762 444
create_helper /src/dnsmasq/src/helper.c 5 ['int', 'int', 'uid_t', 'gid_t', 'long'] 10 0 369 80 124 101 0 310 163
message_handler /src/dnsmasq/src/dbus.c 3 ['DBusConnection*', 'DBusMessage*', 'void*'] 14 0 75 14 14 416 0 2633 117
read_opts /src/dnsmasq/src/option.c 3 ['int', 'char**', 'char*'] 16 0 223 51 94 211 0 1375 110
prove_non_existence_nsec3 /src/dnsmasq/src/dnssec.c 11 ['struct dns_header*', 'size_t', 'unsigned char**', 'int', 'char*', 'char*', 'char*', 'int', 'char*', 'int*', 'int*'] 5 0 89 33 50 63 0 278 98
iface_allowed_v6 /src/dnsmasq/src/network.c 8 ['struct in6_addr*', 'int', 'int', 'int', 'int', 'unsigned int', 'unsigned int', 'void*'] 6 0 14 2 1 49 0 204 85
prove_non_existence_nsec /src/dnsmasq/src/dnssec.c 10 ['struct dns_header*', 'size_t', 'unsigned char**', 'unsigned char**', 'int', 'char*', 'char*', 'char*', 'int', 'int*'] 2 0 63 20 39 7 0 129 58
lease_init /src/dnsmasq/src/lease.c 1 ['time_t'] 9 0 41 13 15 101 0 430 45

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

Functions statically reachable by fuzzers
84.0%
583 / 697
Cyclomatic complexity statically reachable by fuzzers
93.0%
8234 / 8898

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

dhcp.c

Target file: /src/dnsmasq/src/dhcp.c
Target functions: dhcp_packet
#include "ada_fuzz_header.h"

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

  /* target dhcp_packet */
  UNKNOWN_TYPE unknown_0;
  int new_var1 = ada_safe_get_int();
  dhcp_packet(unknown_0, new_var1);

  af_safe_gb_cleanup();
}

option.c

Target file: /src/dnsmasq/src/option.c
Target functions: one_opt, read_opts
#include "ada_fuzz_header.h"

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

  /* target one_opt */
  int new_var2 = ada_safe_get_int();
  char *new_var3 = ada_safe_get_char_p();
  char *new_var4 = ada_safe_get_char_p();
  char *new_var5 = ada_safe_get_char_p();
  int new_var6 = ada_safe_get_int();
  int new_var7 = ada_safe_get_int();
  one_opt(new_var2, new_var3, new_var4, new_var5, new_var6, new_var7);

  /* target read_opts */
  int new_var18 = ada_safe_get_int();
  char **new_var19 = af_get_double_char_p();
  char *new_var20 = ada_safe_get_char_p();
  read_opts(new_var18, new_var19, new_var20);

  af_safe_gb_cleanup();
}

dnsmasq.c

Target file: /src/dnsmasq/src/dnsmasq.c
Target functions: async_event
#include "ada_fuzz_header.h"

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

  /* target async_event */
  int new_var8 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_9;
  async_event(new_var8, unknown_9);

  af_safe_gb_cleanup();
}

helper.c

Target file: /src/dnsmasq/src/helper.c
Target functions: create_helper
#include "ada_fuzz_header.h"

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

  /* target create_helper */
  int new_var10 = ada_safe_get_int();
  int new_var11 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_12;
  UNKNOWN_TYPE unknown_13;
  UNKNOWN_TYPE unknown_14;
  create_helper(new_var10, new_var11, unknown_12, unknown_13, unknown_14);

  af_safe_gb_cleanup();
}

dbus.c

Target file: /src/dnsmasq/src/dbus.c
Target functions: message_handler
#include "ada_fuzz_header.h"

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

  /* target message_handler */
  UNKNOWN_TYPE unknown_15;
  UNKNOWN_TYPE unknown_16;
  UNKNOWN_TYPE unknown_17;
  message_handler(unknown_15, unknown_16, unknown_17);

  af_safe_gb_cleanup();
}

dnssec.c

Target file: /src/dnsmasq/src/dnssec.c
Target functions: prove_non_existence_nsec3, prove_non_existence_nsec
#include "ada_fuzz_header.h"

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

  /* target prove_non_existence_nsec3 */
  structdns_header* new_var21 = calloc(sizeof(structdns_header), 1);
  UNKNOWN_TYPE unknown_22;
  UNKNOWN_TYPE unknown_23;
  int new_var24 = ada_safe_get_int();
  char *new_var25 = ada_safe_get_char_p();
  char *new_var26 = ada_safe_get_char_p();
  char *new_var27 = ada_safe_get_char_p();
  int new_var28 = ada_safe_get_int();
  char *new_var29 = ada_safe_get_char_p();
  int *new_var30 = af_get_int_p();
  int *new_var31 = af_get_int_p();
  prove_non_existence_nsec3(new_var21, unknown_22, unknown_23, new_var24, new_var25, new_var26, new_var27, new_var28, new_var29, new_var30, new_var31);

  /* target prove_non_existence_nsec */
  structdns_header* new_var40 = calloc(sizeof(structdns_header), 1);
  UNKNOWN_TYPE unknown_41;
  UNKNOWN_TYPE unknown_42;
  UNKNOWN_TYPE unknown_43;
  int new_var44 = ada_safe_get_int();
  char *new_var45 = ada_safe_get_char_p();
  char *new_var46 = ada_safe_get_char_p();
  char *new_var47 = ada_safe_get_char_p();
  int new_var48 = ada_safe_get_int();
  int *new_var49 = af_get_int_p();
  prove_non_existence_nsec(new_var40, unknown_41, unknown_42, unknown_43, new_var44, new_var45, new_var46, new_var47, new_var48, new_var49);

  af_safe_gb_cleanup();
}

network.c

Target file: /src/dnsmasq/src/network.c
Target functions: iface_allowed_v6
#include "ada_fuzz_header.h"

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

  /* target iface_allowed_v6 */
  structin6_addr* new_var32 = calloc(sizeof(structin6_addr), 1);
  int new_var33 = ada_safe_get_int();
  int new_var34 = ada_safe_get_int();
  int new_var35 = ada_safe_get_int();
  int new_var36 = ada_safe_get_int();
  UNKNOWN_TYPE unknown_37;
  UNKNOWN_TYPE unknown_38;
  UNKNOWN_TYPE unknown_39;
  iface_allowed_v6(new_var32, new_var33, new_var34, new_var35, new_var36, unknown_37, unknown_38, unknown_39);

  af_safe_gb_cleanup();
}

lease.c

Target file: /src/dnsmasq/src/lease.c
Target functions: lease_init
#include "ada_fuzz_header.h"

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

  /* target lease_init */
  UNKNOWN_TYPE unknown_50;
  lease_init(unknown_50);

  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/dnsmasq/src/network.c ['fuzz_dhcp.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/cache.c ['fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/fuzz_rfc1035.c ['fuzz_rfc1035.c'] []
/src/dnsmasq/contrib/lease-tools/dhcp_lease_time.c [] []
/src/dnsmasq/src/option.c [] []
/src/dnsmasq/src/slaac.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/contrib/lease-tools/dhcp_release6.c [] []
/src/dnsmasq/src/lease.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/rfc1035.c ['fuzz_util.c', 'fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/fuzz_auth.c ['fuzz_auth.c'] []
/src/dnsmasq/src/dns-protocol.h [] []
/src/dnsmasq/src/metrics.c [] []
/src/dnsmasq/src/dnssec.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/loop.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/bpf.c ['fuzz_dhcp.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/conntrack.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/pattern.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/dhcp.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/ipset.c ['fuzz_dhcp.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/util.c ['fuzz_util.c', 'fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/fuzz_header.h ['fuzz_util.c', 'fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/radv.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/dhcp-common.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/auth.c ['fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/ip6addr.h [] []
/src/dnsmasq/src/outpacket.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/tftp.c ['fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/ubus.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/forward.c ['fuzz_dhcp.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/arp.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/edns0.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/poll.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/contrib/leasequery/leasequery.c [] []
/src/fuzz_dhcp6.c ['fuzz_dhcp6.c'] []
/src/fuzz_util.c ['fuzz_util.c'] []
/src/dnsmasq/src/rfc2131.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/crypto.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/dbus.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/dnsmasq.h [] []
/src/dnsmasq/src/rfc3315.c [] []
/src/dnsmasq/src/netlink.c [] []
/src/dnsmasq/src/dnsmasq.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/helper.c [] []
/src/dnsmasq/contrib/lease-tools/dhcp_release.c [] []
/src/fuzz_dhcp.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/dhcp6.c [] []
/src/dnsmasq/src/domain-match.c ['fuzz_dhcp.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/tables.c [] []
/src/dnsmasq/src/nftset.c ['fuzz_dhcp.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/blockdata.c ['fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/inotify.c [] []
/src/dnsmasq/src/dump.c ['fuzz_dhcp.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/rrfilter.c ['fuzz_util.c', 'fuzz_dhcp.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/domain.c ['fuzz_util.c', 'fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []
/src/dnsmasq/src/log.c ['fuzz_util.c', 'fuzz_dhcp.c', 'fuzz_auth.c', 'fuzz_rfc1035.c', 'fuzz_dhcp6.c'] []

Directories in report

Directory
/src/dnsmasq/contrib/leasequery/
/src/
/src/dnsmasq/contrib/lease-tools/
/src/dnsmasq/src/