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_filter

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 2019 100.%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 0 0.0%
All colors 2019 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
2018 0 EP call site: 00000 pcap_compile

Runtime coverage analysis

Covered functions
0
Functions that are reachable but not covered
358
Reachable functions
358
Percentage of reachable functions covered
0.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
build/../testprogs/fuzz/fuzz_filter.c 1
pcap.c 12
gencode.c 211
build/scanner.c 24
fmtutils.c 2
build/grammar.c 2
missing/strlcpy.c 1
scanner.l 2
nametoaddr.c 16
extract.h 2
build/grammar.y 4
optimize.c 48
bpf_filter.c 2

Fuzzer: fuzz_pcap

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 29 50.0%
gold [1:9] 3 5.17%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 26 44.8%
All colors 58 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 21 pcap_open_offline_with_tstamp_precision call site: 00021 pcapint_fmt_errmsg_for_errno
8 43 pcap_next_ex call site: 00043 pcapint_filter
3 6 bufferToFile call site: 00006 __errno_location
2 10 bufferToFile call site: 00010 __errno_location
2 18 pcap_open_offline call site: 00018 snprintf
2 33 pcap_fopen_offline_with_tstamp_precision call site: 00033 pcapint_fmt_errmsg_for_errno
1 13 bufferToFile call site: 00013 fclose
1 15 bufferToFile call site: 00015 unlink
1 30 pcap_open_offline_with_tstamp_precision call site: 00030 snprintf
1 54 LLVMFuzzerTestOneInput call site: 00054 fprintf

Runtime coverage analysis

Covered functions
47
Functions that are reachable but not covered
25
Reachable functions
35
Percentage of reachable functions covered
28.57%
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.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
build/../testprogs/fuzz/fuzz_pcap.c 2
savefile.c 4
fmtutils.c 2
pcap.c 4
bpf_filter.c 2
extract.h 2

Fuzzer: fuzz_both

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 667 32.3%
gold [1:9] 69 3.34%
yellow [10:29] 81 3.93%
greenyellow [30:49] 18 0.87%
lawngreen 50+ 1226 59.4%
All colors 2061 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
81 1493 gen_pppoes call site: 01493 gen_geneve
80 928 gen_scode call site: 00928 gen_gateway
55 1323 gen_mtp2type_abbrev call site: 01323 gen_broadcast
27 1281 gen_atmmulti_abbrev call site: 01281 gen_atmtype_abbrev
25 1401 gen_byteop call site: 01401 gen_vlan
25 1439 gen_vlan_vid_test call site: 01439 gen_mcmp
21 103 sdup call site: 00103 stou
17 125 pcap_lex call site: 00125 pcap_restart
15 1049 gen_mcode call site: 01049 gen_ncode
14 1725 gen_llc_u_subtype call site: 01725 gen_llc_s_subtype
12 1669 gen_p80211_fcdir call site: 01669 gen_llc
11 84 pcap_parse call site: 00084 pcap__create_buffer

Runtime coverage analysis

Covered functions
326
Functions that are reachable but not covered
80
Reachable functions
370
Percentage of reachable functions covered
78.38%
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
build/../testprogs/fuzz/fuzz_both.c 2
savefile.c 4
fmtutils.c 2
pcap.c 10
gencode.c 211
build/scanner.c 24
build/grammar.c 2
missing/strlcpy.c 1
scanner.l 2
nametoaddr.c 16
extract.h 2
build/grammar.y 4
optimize.c 48
bpf_filter.c 4

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
pcap_activate_linux /src/libpcap/pcap-linux.c 1 ['N/A'] 8 0 343 45 15 56 0 293 262
pcap_ng_next_packet /src/libpcap/sf-pcapng.c 3 ['N/A', 'N/A', 'N/A'] 6 0 734 70 19 38 0 216 189
pcap_lookupdev /src/libpcap/pcap.c 1 ['N/A'] 9 0 74 14 6 41 0 185 137
pcap_read_linux_mmap_v3 /src/libpcap/pcap-linux.c 4 ['N/A', 'int', 'N/A', 'N/A'] 6 0 522 77 28 26 0 181 92
pcap_open_live /src/libpcap/pcap.c 5 ['N/A', 'int', 'int', 'int', 'N/A'] 8 0 183 29 12 30 0 137 91
netfilter_activate /src/libpcap/pcap-netfilter-linux.c 1 ['N/A'] 5 0 598 89 35 28 0 119 80
pcap_setfilter_linux /src/libpcap/pcap-linux.c 2 ['N/A', 'N/A'] 5 0 344 65 21 23 0 167 68
pcap_dump_open_append /src/libpcap/sf-pcap.c 2 ['N/A', 'N/A'] 4 0 424 60 20 18 0 72 45
netfilter_read_linux /src/libpcap/pcap-netfilter-linux.c 4 ['N/A', 'int', 'N/A', 'N/A'] 4 0 739 112 37 23 0 147 41
pcap_check_header /src/libpcap/sf-pcap.c 5 ['N/A', 'N/A', 'int', 'N/A', 'N/A'] 6 0 523 75 24 16 0 71 35

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

Functions statically reachable by fuzzers
76.0%
452 / 598
Cyclomatic complexity statically reachable by fuzzers
86.0%
3450 / 4014

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/libpcap/build/grammar.c ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/pcap.c ['fuzz_filter', 'fuzz_pcap', 'fuzz_both'] ['fuzz_pcap', 'fuzz_both']
/src/libpcap/sf-pcapng.c [] []
/src/libpcap/savefile.c ['fuzz_pcap', 'fuzz_both'] ['fuzz_pcap', 'fuzz_both']
/src/libpcap/nametoaddr.c ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/gencode.c ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/extract.h ['fuzz_filter', 'fuzz_pcap', 'fuzz_both'] ['fuzz_pcap', 'fuzz_both']
/src/libpcap/pcap-linux.c [] []
/src/libpcap/build/scanner.c ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/build/../testprogs/fuzz/fuzz_filter.c ['fuzz_filter'] []
/src/libpcap/sf-pcap.c [] []
/src/libpcap/scanner.l ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/bpf_filter.c ['fuzz_filter', 'fuzz_pcap', 'fuzz_both'] ['fuzz_both']
/src/libpcap/pcap/pcap-inttypes.h [] []
/src/libpcap/build/grammar.y ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/pcap-netfilter-linux.c [] []
/src/libpcap/pcap-common.c [] []
/src/libpcap/optimize.c ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/build/../testprogs/fuzz/fuzz_pcap.c ['fuzz_pcap'] []
/src/libpcap/pcap-util.c [] []
/src/libpcap/missing/strlcpy.c ['fuzz_filter', 'fuzz_both'] ['fuzz_both']
/src/libpcap/build/../testprogs/fuzz/fuzz_both.c ['fuzz_both'] []
/src/libpcap/pcap-usb-linux.c [] []
/src/libpcap/pcap-util.h [] []
/src/libpcap/fad-getad.c [] []
/src/libpcap/fmtutils.c ['fuzz_filter', 'fuzz_pcap', 'fuzz_both'] []
/src/libpcap/pcap-usb-linux-common.h [] []

Directories in report

Directory
/src/libpcap/pcap/
/src/libpcap/build/../testprogs/fuzz/
/src/libpcap/missing/
/src/libpcap/build/
/src/libpcap/