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: bpf-object-fuzzer

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 379 26.8%
gold [1:9] 93 6.59%
yellow [10:29] 74 5.24%
greenyellow [30:49] 36 2.55%
lawngreen 50+ 828 58.7%
All colors 1410 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
61 119 libbpf_errstr call site: 00119 elf_begin
34 1295 bpf_object__collect_map_relos call site: 01295 bpf_object__find_map_by_name
20 1262 bpf_object__collect_st_ops_relos call site: 01262 resolve_func_ptr
12 247 load_shdr_wrlock call site: 00247 pread_retry
9 340 __libelf_decompress_elf call site: 00340 elf32_getchdr
8 199 bpf_object__elf_init call site: 00199 pread_retry
8 1131 bpf_map__set_pin_path call site: 01131 fill_map_from_def
7 760 btf__add_var call site: 00760 btf__find_str
7 987 create_placeholder_fd call site: 00987 dup_good_fd
6 269 load_shdr_wrlock call site: 00269 __bswap_64
6 834 btf__resolve_size call site: 00834 determine_ptr_size
5 193 elf64_getehdr call site: 00193 elf_errmsg

Runtime coverage analysis

Covered functions
301
Functions that are reachable but not covered
76
Reachable functions
352
Percentage of reachable functions covered
78.41%
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/bpf-object-fuzzer.c 2
src/libbpf.c 113
src/./libbpf_internal.h 19
src/../include/linux/err.h 4
elfutils/libelf/elf_version.c 1
elfutils/libelf/elf_error.c 2
src/libbpf_probes.c 3
elfutils/libelf/elf_memory.c 1
elfutils/libelf/elf_begin.c 12
elfutils/libelf/./common.h 2
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
elfutils/libelf/../lib/system.h 1
src/libbpf_utils.c 1
elfutils/libelf/elf_kind.c 1
elfutils/libelf/gelf_getclass.c 1
elfutils/libelf/./elf32_getehdr.c 2
elfutils/libelf/elf_getshdrstrndx.c 1
elfutils/libelf/elf_getscn.c 1
elfutils/libelf/elf_rawdata.c 1
elfutils/libelf/elf_getdata.c 7
elfutils/libelf/elf32_getshdr.c 5
elfutils/libelf/elf_getshdrnum.c 2
elfutils/libelf/./elf32_getshdr.c 5
elfutils/libelf/gelf_getehdr.c 1
elfutils/libelf/elf_end.c 1
elfutils/libelf/elf_nextscn.c 1
elfutils/libelf/elf_ndxscn.c 1
elfutils/libelf/elf_strptr.c 3
elfutils/libelf/elf_compress.c 3
elfutils/libelf/gelf_getchdr.c 1
elfutils/libelf/elf32_getchdr.c 1
elfutils/libelf/./elf32_getchdr.c 1
src/btf.c 53
src/./btf.h 29
src/strset.c 9
src/hashmap.c 10
src/./hashmap.h 2
src/usdt.c 1
src/gen_loader.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
bpf_object__load_skeleton /src/libbpf/src/libbpf.c 1 ['N/A'] 19 0 98 14 5 529 0 3385 2060
attach_usdt /src/libbpf/src/libbpf.c 3 ['N/A', 'size_t', 'N/A'] 14 0 84 11 4 231 0 1668 800
btf__dedup /src/libbpf/src/btf.c 2 ['N/A', 'N/A'] 11 0 208 48 14 117 0 598 352
btf__distill_base /src/libbpf/src/btf.c 3 ['N/A', 'N/A', 'N/A'] 10 0 298 45 18 77 0 347 92
elf_compress /src/libbpf/elfutils/libelf/elf_compress.c 3 ['N/A', 'int', 'int'] 10 0 547 65 27 45 0 332 92
attach_kprobe_multi /src/libbpf/src/libbpf.c 3 ['N/A', 'size_t', 'N/A'] 7 0 125 16 6 54 0 324 86
libbpf_prepare_prog_load /src/libbpf/src/libbpf.c 3 ['N/A', 'N/A', 'size_t'] 11 0 205 33 13 93 0 400 65
perf_buffer__new_raw /src/libbpf/src/libbpf.c 6 ['int', 'size_t', 'N/A', 'N/A', 'N/A', 'N/A'] 6 0 158 29 11 40 0 155 64
bpf_object__pin /src/libbpf/src/libbpf.c 2 ['N/A', 'N/A'] 7 0 56 8 4 39 0 182 56
attach_ksyscall /src/libbpf/src/libbpf.c 3 ['N/A', 'size_t', 'N/A'] 8 0 112 15 6 60 0 326 52

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

Functions statically reachable by fuzzers
70.0%
769 / 1101
Cyclomatic complexity statically reachable by fuzzers
80.0%
5769 / 7237

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

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/libbpf/elfutils/libelf/elf_end.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/strset.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/bpf.c [] []
/src/libbpf/src/./hashmap.h ['bpf-object-fuzzer'] []
/src/libbpf/elfutils/libelf/./elf32_getehdr.c ['bpf-object-fuzzer'] []
/src/libbpf/src/./btf.h ['bpf-object-fuzzer'] []
/src/libbpf/elfutils/libelf/elf_rawdata.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/./gelf_xlate.h [] []
/src/libbpf/elfutils/libelf/elf_getshdrnum.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/./elf32_getshdr.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/zip.c [] []
/src/libbpf/elfutils/libelf/elf_compress.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getclass.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/libbpf.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/elf_version.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getshdr.c [] []
/src/libbpf/elfutils/libelf/gelf_xlate.c [] []
/src/libbpf/fuzz/bpf-object-fuzzer.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/btf_relocate.c [] []
/src/libbpf/elfutils/libelf/elf_getshdrstrndx.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getsym.c [] []
/src/libbpf/elfutils/libelf/gelf_fsize.c [] []
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['bpf-object-fuzzer'] []
/src/libbpf/elfutils/libelf/elf_ndxscn.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getehdr.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getnote.c [] []
/src/libbpf/elfutils/libelf/elf32_getphdr.c [] []
/src/libbpf/elfutils/libelf/gelf_xlatetof.c [] []
/src/libbpf/elfutils/libelf/./gnuhash_xlate.h [] []
/src/libbpf/elfutils/libelf/gelf_getverdaux.c [] []
/src/libbpf/elfutils/libelf/elf_begin.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/usdt.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/gen_loader.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/btf_iter.c [] []
/src/libbpf/elfutils/libelf/./version_xlate.h [] []
/src/libbpf/elfutils/libelf/gelf_getchdr.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/elf_error.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/libbpf_probes.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getverdef.c [] []
/src/libbpf/elfutils/libelf/./elf32_getchdr.c ['bpf-object-fuzzer'] []
/src/libbpf/src/features.c [] []
/src/libbpf/elfutils/libelf/../lib/system.h ['bpf-object-fuzzer'] []
/src/libbpf/src/./libbpf_internal.h ['bpf-object-fuzzer'] []
/src/libbpf/elfutils/libelf/elf32_xlatetof.c [] []
/src/libbpf/src/../include/linux/ring_buffer.h [] []
/src/libbpf/elfutils/libelf/elf_kind.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/btf.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getphdr.c [] []
/src/libbpf/src/libbpf_utils.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/./common.h ['bpf-object-fuzzer'] []
/src/libbpf/elfutils/libelf/./chdr_xlate.h [] []
/src/libbpf/elfutils/libelf/elf_strptr.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/elf_getphdrnum.c [] []
/src/libbpf/elfutils/libelf/elf32_getshdr.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/../include/linux/err.h ['bpf-object-fuzzer'] []
/src/libbpf/elfutils/libelf/elf_memory.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/elf32_getchdr.c ['bpf-object-fuzzer'] []
/src/libbpf/elfutils/libelf/./elf32_getphdr.c [] []
/src/libbpf/elfutils/libelf/elf_nextscn.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/src/relo_core.c [] []
/src/libbpf/src/elf.c [] []
/src/libbpf/src/hashmap.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/./elf32_xlatetof.c [] []
/src/libbpf/elfutils/libelf/./note_xlate.h [] []
/src/libbpf/elfutils/libelf/elf_getscn.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']
/src/libbpf/elfutils/libelf/gelf_getversym.c [] []
/src/libbpf/elfutils/libelf/elf_getdata.c ['bpf-object-fuzzer'] ['bpf-object-fuzzer']

Directories in report

Directory
/src/libbpf/src/./
/src/libbpf/elfutils/libelf/
/usr/include/x86_64-linux-gnu/bits/
/src/libbpf/src/../include/linux/
/src/libbpf/fuzz/
/src/libbpf/src/
/src/libbpf/elfutils/libelf/./
/src/libbpf/elfutils/libelf/../lib/