Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzzer details

Fuzzer: fuzz_dostring

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 410 98.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 8 1.91%
All colors 418 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
337 54 LLVMFuzzerTestOneInput call site: 00054 janet_pretty_one
47 1 LLVMFuzzerTestOneInput call site: 00001 janet_ev_init
23 394 LLVMFuzzerTestOneInput call site: 00394 janet_clear_memory
3 49 LLVMFuzzerTestOneInput call site: 00049 pushstate

Runtime coverage analysis

Covered functions
125
Functions that are reachable but not covered
73
Reachable functions
194
Percentage of reachable functions covered
62.37%
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
/src/janet/./test/fuzzers/fuzz_dostring.c 1
vm.c 2
symcache.c 8
table.c 11
gc.c 11
util.c 10
wrap.c 5
math.c 2
ev.c 9
parse.c 9
capi.c 6
string.c 5
pp.c 21
buffer.c 10
/usr/include/stdlib.h 1
value.c 7
struct.c 2
abstract.c 2

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
janet_dostring /src/janet/src/core/run.c 4 ['struct.JanetTable *', 'char *', 'char *', 'union.Janet *'] 31 0 34 6 3 402 0 2654 1652
cfun_peg_replace /src/janet/src/core/peg.c 2 ['int ', 'union.Janet *'] 31 0 14 3 2 260 0 1688 258
cfun_ffi_buffer_write /src/janet/src/core/ffi.c 2 ['int ', 'union.Janet *'] 29 0 69 8 3 143 0 825 193
janet_asm1 /src/janet/src/core/asm.c 3 ['struct.JanetAssembleResult *', 'struct.JanetAssembler *', 'size_t '] 30 0 1270 198 50 124 3 808 142
os_execute /src/janet/src/core/os.c 2 ['int ', 'union.Janet *'] 30 0 14 3 2 168 0 846 141
janetc_fn /src/janet/src/core/specials.c 4 ['struct.JanetSlot *', 'struct.JanetFopts *', 'int ', 'union.Janet *'] 30 0 924 142 52 287 0 1885 126
cfun_net_connect /src/janet/src/core/net.c 2 ['int ', 'union.Janet *'] 29 0 325 53 15 180 0 902 96
cfun_disasm /src/janet/src/core/asm.c 2 ['int ', 'union.Janet *'] 28 0 179 32 15 144 0 755 85
janet_get_core_table /src/janet/src/core/util.c 1 ['char *'] 30 0 47 8 4 175 0 942 77
janet_cfun_stream_read /src/janet/src/core/ev.c 2 ['int ', 'union.Janet *'] 29 0 57 12 5 172 0 881 60

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

Functions statically reachable by fuzzers
42.0%
585 / 1391
Cyclomatic complexity statically reachable by fuzzers
56.0%
3730 / 6658

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 Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

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/janet/src/core/fiber.c [] []
/src/janet/src/core/bytecode.c [] []
/src/janet/src/core/abstract.c ['fuzz_dostring'] []
/src/janet/src/core/inttypes.c [] []
/src/janet/src/core/value.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/table.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/parse.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/io.c [] []
/src/janet/src/core/asm.c [] []
/src/janet/src/core/net.c [] []
/src/janet/src/core/math.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/array.c [] []
/src/janet/src/core/vm.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/string.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/debug.c [] []
/src/janet/src/core/strtod.c [] []
/src/janet/src/core/capi.c ['fuzz_dostring'] []
/src/janet/src/core/compile.c [] []
/src/janet/src/core/vector.c [] []
/src/janet/src/core/regalloc.c [] []
/usr/include/x86_64-linux-gnu/sys/stat.h [] []
/src/janet/src/core/run.c [] []
/src/janet/src/core/wrap.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/ev.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/gc.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/peg.c [] []
/src/janet/src/core/util.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/os.c [] []
/src/janet/src/core/cfuns.c [] []
/usr/include/stdlib.h ['fuzz_dostring'] []
/src/janet/src/core/ffi.c [] []
/src/janet/src/core/pp.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/corelib.c [] []
/src/janet/src/core/marsh.c [] []
/src/janet/src/core/symcache.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/tuple.c [] []
/src/janet/src/core/specials.c [] []
/src/janet/src/core/struct.c ['fuzz_dostring'] ['fuzz_dostring']
/src/janet/src/core/emit.c [] []
/src/janet/src/core/buffer.c ['fuzz_dostring'] ['fuzz_dostring']
/usr/include/x86_64-linux-gnu/bits/byteswap.h [] []
/src/janet/./test/fuzzers/fuzz_dostring.c ['fuzz_dostring'] []
/src/janet/src/core/state.c [] []

Directories in report

Directory
/usr/include/
/usr/include/x86_64-linux-gnu/sys/
/src/janet/./test/fuzzers/
/src/janet/src/core/
/usr/include/x86_64-linux-gnu/bits/