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: bin/fuzz/config_fuzzer.cc

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: bin/fuzz/pattern_fuzzer.cc

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: samples/forthsalon/forth.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: bin/fuzz/request_fuzzer.cc

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: bin/fuzz/template_fuzzer.cc

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: bin/fuzz/h2_huffman_fuzzer.cc

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
lwan_init_with_config /src/lwan/src/lib/lwan.c 2 ['struct lwan*', 'struct lwan_config*'] 17 0 39 6 5 352 2 672 490
create_site /src/lwan/src/samples/smolsite/main.c 3 ['void*', 'void*', 'void*'] 10 0 51 10 15 99 0 333 302
fastcgi_handle_request /src/lwan/src/lib/lwan-mod-fastcgi.c 3 ['struct lwan_request*', 'struct lwan_response*', 'void*'] 11 0 52 18 18 198 0 305 226
hub_connection_handler /src/lwan/src/samples/chatr/main.c 4 ['struct lwan_request*', 'struct lwan_response*', 'char*', 'void*'] 13 0 29 9 9 196 0 270 182
thread_io_loop /src/lwan/src/lib/lwan-thread.c 1 ['void*'] 14 0 60 13 22 226 0 273 158
rewrite_parse_conf /src/lwan/src/lib/lwan-mod-rewrite.c 2 ['void*', 'struct config*'] 15 0 18 5 6 53 0 154 106
worker_thread /src/lwan/src/bin/tools/weighttp.c 1 ['void*'] 3 0 37 6 14 23 0 88 88
rewrite_handle_request /src/lwan/src/lib/lwan-mod-rewrite.c 3 ['struct lwan_request*', 'struct lwan_response*', 'void*'] 8 0 26 8 9 120 0 240 87
config_request /src/lwan/src/bin/tools/weighttp.c 2 ['Config*', 'config_params*'] 2 0 162 49 57 19 0 76 76
create_cache_entry /src/lwan/src/lib/lwan-mod-serve-files.c 3 ['void*', 'void*', 'void*'] 4 0 19 7 6 36 0 78 75

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

Functions statically reachable by fuzzers
45.0%
559 / 1255
Cyclomatic complexity statically reachable by fuzzers
60.0%
2293 / 3831

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

lwan.c

Target file: /src/lwan/src/lib/lwan.c
Target functions: lwan_init_with_config
#include "ada_fuzz_header.h"

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

  /* target lwan_init_with_config */
  structlwan* new_var0 = calloc(sizeof(structlwan), 1);
  structlwan_config* new_var1 = calloc(sizeof(structlwan_config), 1);
  lwan_init_with_config(new_var0, new_var1);

  af_safe_gb_cleanup();
}

main.c

Target file: /src/lwan/src/samples/smolsite/main.c
Target functions: create_site
#include "ada_fuzz_header.h"

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

  /* target create_site */
  UNKNOWN_TYPE unknown_2;
  UNKNOWN_TYPE unknown_3;
  UNKNOWN_TYPE unknown_4;
  create_site(unknown_2, unknown_3, unknown_4);

  af_safe_gb_cleanup();
}

lwan-mod-fastcgi.c

Target file: /src/lwan/src/lib/lwan-mod-fastcgi.c
Target functions: fastcgi_handle_request
#include "ada_fuzz_header.h"

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

  /* target fastcgi_handle_request */
  structlwan_request* new_var5 = calloc(sizeof(structlwan_request), 1);
  structlwan_response* new_var6 = calloc(sizeof(structlwan_response), 1);
  UNKNOWN_TYPE unknown_7;
  fastcgi_handle_request(new_var5, new_var6, unknown_7);

  af_safe_gb_cleanup();
}

main.c

Target file: /src/lwan/src/samples/chatr/main.c
Target functions: hub_connection_handler
#include "ada_fuzz_header.h"

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

  /* target hub_connection_handler */
  structlwan_request* new_var8 = calloc(sizeof(structlwan_request), 1);
  structlwan_response* new_var9 = calloc(sizeof(structlwan_response), 1);
  char *new_var10 = ada_safe_get_char_p();
  UNKNOWN_TYPE unknown_11;
  hub_connection_handler(new_var8, new_var9, new_var10, unknown_11);

  af_safe_gb_cleanup();
}

lwan-thread.c

Target file: /src/lwan/src/lib/lwan-thread.c
Target functions: thread_io_loop
#include "ada_fuzz_header.h"

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

  /* target thread_io_loop */
  UNKNOWN_TYPE unknown_12;
  thread_io_loop(unknown_12);

  af_safe_gb_cleanup();
}

lwan-mod-rewrite.c

Target file: /src/lwan/src/lib/lwan-mod-rewrite.c
Target functions: rewrite_parse_conf, rewrite_handle_request
#include "ada_fuzz_header.h"

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

  /* target rewrite_parse_conf */
  UNKNOWN_TYPE unknown_13;
  structconfig* new_var14 = calloc(sizeof(structconfig), 1);
  rewrite_parse_conf(unknown_13, new_var14);

  /* target rewrite_handle_request */
  structlwan_request* new_var16 = calloc(sizeof(structlwan_request), 1);
  structlwan_response* new_var17 = calloc(sizeof(structlwan_response), 1);
  UNKNOWN_TYPE unknown_18;
  rewrite_handle_request(new_var16, new_var17, unknown_18);

  af_safe_gb_cleanup();
}

weighttp.c

Target file: /src/lwan/src/bin/tools/weighttp.c
Target functions: worker_thread, config_request
#include "ada_fuzz_header.h"

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

  /* target worker_thread */
  UNKNOWN_TYPE unknown_15;
  worker_thread(unknown_15);

  /* target config_request */
  UNKNOWN_TYPE unknown_19;
  UNKNOWN_TYPE unknown_20;
  config_request(unknown_19, unknown_20);

  af_safe_gb_cleanup();
}

lwan-mod-serve-files.c

Target file: /src/lwan/src/lib/lwan-mod-serve-files.c
Target functions: create_cache_entry
#include "ada_fuzz_header.h"

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

  /* target create_cache_entry */
  UNKNOWN_TYPE unknown_21;
  UNKNOWN_TYPE unknown_22;
  UNKNOWN_TYPE unknown_23;
  create_cache_entry(unknown_21, unknown_22, unknown_23);

  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/lwan/src/lib/realpathat.c [] []
/src/lwan/src/lib/lwan-h2-huffman.c ['bin/fuzz/h2_huffman_fuzzer.cc'] []
/src/lwan/src/samples/clock/numbers.c [] []
/src/lwan/src/lib/missing/stdlib.h [] []
/src/lwan/src/lib/sd-daemon.c [] []
/src/lwan/src/lib/lwan-time.c [] []
/src/lwan/src/bin/lwan/main.c [] []
/src/lwan/src/samples/smolsite/main.c [] []
/src/lwan/src/3rdparty/libucontext/examples/cooperative_threading.c [] []
/src/lwan/src/samples/send-money-json-api/main.c [] []
/src/lwan/src/lib/lwan-job.c [] []
/src/lwan/src/lib/lwan-config.c ['bin/fuzz/config_fuzzer.cc', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/3rdparty/libucontext/arch/common/common-defs.h [] []
/src/lwan/src/lib/list.h ['bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/lib/lwan-coro.c [] []
/src/lwan/src/lib/lwan-request.c [] []
/src/lwan/src/3rdparty/libucontext/libucontext_posix.c [] []
/src/lwan/src/lib/missing-epoll.c [] []
/src/lwan/src/lib/lwan-response.c [] []
/src/lwan/src/lib/lwan-io-wrappers.c [] []
/src/lwan/src/lib/lwan-http-authorize.c [] []
/src/lwan/src/samples/smolsite/junzip.h [] []
/src/lwan/src/lib/lwan-mod-lua.h [] []
/src/lwan/src/lib/lwan-strbuf.h [] []
/src/lwan/src/samples/techempower/json.c ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/lib/lwan.h [] []
/src/lwan/src/lib/missing/string.h ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c'] []
/src/lwan/src/lib/lwan-straitjacket.c [] []
/src/lwan/src/lib/lwan-cache.c [] []
/src/lwan/src/bin/tools/configdump.c ['bin/fuzz/config_fuzzer.cc'] []
/src/lwan/src/lib/lwan.c [] []
/src/lwan/src/lib/missing/endian.h [] []
/src/lwan/src/samples/forthsalon/forth.c ['samples/forthsalon/forth.c'] []
/src/lwan/src/lib/lwan-mod-serve-files.c [] []
/src/lwan/src/samples/techempower/techempower.c ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/samples/websocket/main.c [] []
/src/lwan/src/samples/smolsite/junzip.c [] []
/src/lwan/src/lib/lwan-mod-redirect.h [] []
/src/lwan/src/3rdparty/libucontext/arch/common/common-trampoline.c [] []
/src/lwan/src/bin/tools/weighttp.c [] []
/src/lwan/src/samples/clock/gifenc.c [] []
/src/lwan/src/lib/lwan-arena.c [] []
/src/lwan/src/samples/asyncawait/main.c [] []
/src/lwan/src/3rdparty/libucontext/arch/arm/defs.h [] []
/src/lwan/src/lib/lwan-strbuf.c ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/3rdparty/libucontext/arch/x86_64/defs.h [] []
/src/lwan/src/lib/lwan-http-status.h [] []
/src/lwan/src/samples/clock/blocks.c [] []
/src/lwan/src/samples/techempower/database.c ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/bin/tools/bin2hex.c [] []
/src/lwan/src/lib/lwan-template.h ['bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/lib/int-to-str.c [] []
/src/lwan/src/lib/lwan-websocket.c [] []
/src/lwan/src/samples/pastebin/main.c [] []
/src/lwan/src/lib/lwan-lua.c ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/lib/lwan-private.h ['bin/fuzz/config_fuzzer.cc'] []
/src/lwan/src/lib/lwan-http-authorize.h [] []
/src/lwan/src/samples/clock/pong.c [] []
/src/lwan/src/lib/lwan-tq.c [] []
/src/lwan/src/samples/chatr/main.c [] []
/src/lwan/src/lib/lwan-mod-rewrite.c [] []
/src/lwan/src/bin/fuzz/request_fuzzer.cc ['bin/fuzz/request_fuzzer.cc'] []
/src/lwan/src/bin/fuzz/config_fuzzer.cc ['bin/fuzz/config_fuzzer.cc'] []
/src/lwan/src/lib/hash.c ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/lib/lwan-pubsub.c [] []
/src/lwan/src/samples/hello-no-meta/main.c [] []
/src/lwan/src/bin/fuzz/h2_huffman_fuzzer.cc ['bin/fuzz/h2_huffman_fuzzer.cc'] []
/src/lwan/src/samples/clock/main.c [] []
/src/lwan/src/samples/freegeoip/freegeoip.c [] []
/src/lwan/src/lib/missing.c ['bin/fuzz/config_fuzzer.cc', 'samples/forthsalon/forth.c', 'bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/samples/clock/numbers.h [] []
/src/lwan/src/lib/timeout.h [] []
/src/lwan/src/lib/patterns.c ['bin/fuzz/pattern_fuzzer.cc'] []
/src/lwan/src/lib/lwan-array.h [] []
/src/lwan/src/lib/lwan-trie.c [] []
/src/lwan/src/lib/lwan-mod-lua.c [] []
/src/lwan/src/samples/forthsalon/main.c [] []
/src/lwan/src/lib/ringbuffer.h [] []
/src/lwan/src/3rdparty/libucontext/test_libucontext_posix.c [] []
/src/lwan/src/lib/lwan-mod-response.h [] []
/src/lwan/src/lib/lwan-status.h [] []
/src/lwan/src/lib/lwan-status.c [] []
/src/lwan/src/lib/lwan-thread.c [] []
/src/lwan/src/lib/missing-pthread.c [] []
/src/lwan/src/lib/lwan-mod-redirect.c [] []
/src/lwan/src/lib/missing/linux/capability.h [] []
/src/lwan/src/lib/sd-daemon.h [] []
/src/lwan/src/lib/lwan-array.c [] []
/src/lwan/src/lib/lwan-mod-response.c [] []
/src/lwan/src/lib/lwan-readahead.c [] []
/src/lwan/src/lib/missing/ioprio.h [] []
/src/lwan/src/bin/tools/mimegen.c [] []
/src/lwan/src/3rdparty/libucontext/arch/x86_64/makecontext.c [] []
/src/lwan/src/bin/fuzz/template_fuzzer.cc ['bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/lib/lwan-socket.c [] []
/src/lwan/src/lib/lwan-io-wrappers.h [] []
/src/lwan/src/lib/list.c [] []
/src/lwan/src/lib/hash.h [] []
/src/lwan/src/samples/techempower/json.h [] []
/src/lwan/src/lib/lwan-template.c ['bin/fuzz/template_fuzzer.cc'] []
/src/lwan/src/samples/clock/xdaliclock.c [] []
/src/lwan/src/lib/lwan-mod-serve-files.h [] []
/src/lwan/src/lib/missing/assert.h [] []
/src/lwan/src/bin/tools/statuslookupgen.c [] []
/src/lwan/src/3rdparty/libucontext/arch/ppc64/retfromsyscall.c [] []
/src/lwan/src/lib/lwan-mod-fastcgi.c [] []
/src/lwan/src/samples/smolsite/qrcodegen.h [] []
/src/lwan/src/bin/fuzz/pattern_fuzzer.cc ['bin/fuzz/pattern_fuzzer.cc'] []
/src/lwan/src/lib/sha1.c [] []
/src/lwan/src/samples/smolsite/qrcodegen.c [] []
/src/lwan/src/lib/lwan-mod-fastcgi.h [] []
/src/lwan/src/3rdparty/libucontext/arch/mips64/defs.h [] []
/src/lwan/src/3rdparty/libucontext/arch/s390x/defs.h [] []
/src/lwan/src/samples/forthsalon/gif.h [] []
/src/lwan/src/lib/base64.h [] []
/src/lwan/src/lib/base64.c [] []
/src/lwan/src/lib/timeout.c [] []
/src/lwan/src/lib/lwan-tables.c [] []

Directories in report

Directory
/src/lwan/src/samples/chatr/
/src/lwan/src/samples/techempower/
/src/lwan/src/bin/fuzz/
/src/lwan/src/3rdparty/libucontext/arch/s390x/
/src/lwan/src/samples/send-money-json-api/
/src/lwan/src/lib/
/src/lwan/src/lib/missing/linux/
/src/lwan/src/3rdparty/libucontext/arch/arm/
/src/lwan/src/3rdparty/libucontext/examples/
/src/lwan/src/3rdparty/libucontext/arch/mips64/
/src/lwan/src/3rdparty/libucontext/
/src/lwan/src/bin/tools/
/src/lwan/src/lib/missing/
/src/lwan/src/samples/clock/
/src/lwan/src/samples/hello-no-meta/
/src/lwan/src/samples/smolsite/
/src/lwan/src/3rdparty/libucontext/arch/common/
/src/lwan/src/samples/asyncawait/
/src/lwan/src/bin/lwan/
/src/lwan/src/3rdparty/libucontext/arch/x86_64/
/src/lwan/src/samples/websocket/
/src/lwan/src/samples/forthsalon/
/src/lwan/src/3rdparty/libucontext/arch/ppc64/
/src/lwan/src/samples/freegeoip/
/src/lwan/src/samples/pastebin/