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

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 2059 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 2059 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
2058 0 EP call site: 00000 pcap_compile

Runtime coverage analysis

Covered functions
0
Functions that are reachable but not covered
302
Reachable functions
302
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 20
gencode.c 154
build/scanner.c 24
fmtutils.c 2
build/grammar.c 2
missing/strlcpy.c 1
scanner.l 2
nametoaddr.c 11
extract.h 2
build/grammar.y 4
optimize.c 47

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 28 41.7%
gold [1:9] 3 4.47%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 36 53.7%
All colors 67 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_alloc_pcap_t call site: 00000 /src/libpcap/pcap.c:2498
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_fopen_offline_with_tstamp_precision call site: 00030 /src/libpcap/savefile.c:506
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_check_header call site: 00000 /src/libpcap/sf-pcap.c:185
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:461
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:615
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:646
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:698
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_ng_check_header call site: 00000 /src/libpcap/sf-pcapng.c:822
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_ng_check_header call site: 00000 /src/libpcap/sf-pcapng.c:837
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 read_bytes call site: 00000 /src/libpcap/sf-pcapng.c:265
2 2 1 :

['__errno_location']

2 2 bufferToFile call site: 00009 /src/libpcap/build/../testprogs/fuzz/fuzz_pcap.c:21
0 0 None 38 138 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:606

Runtime coverage analysis

Covered functions
43
Functions that are reachable but not covered
31
Reachable functions
43
Percentage of reachable functions covered
27.91%
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_pcap.c 2
savefile.c 10
fmtutils.c 2
bpf_filter.c 2
extract.h 2
missing/strlcpy.c 1
pcap.c 4

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 605 28.9%
gold [1:9] 255 12.1%
yellow [10:29] 84 4.01%
greenyellow [30:49] 71 3.39%
lawngreen 50+ 1078 51.5%
All colors 2093 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
337 337 1 :

['gen_vlan_bpf_extensions']

337 337 gen_vlan call site: 01552 /src/libpcap/gencode.c:9261
85 85 8 :

['pcap_restart', 'fread', 'getc', 'ferror', 'yy_fatal_error', 'clearerr', '__errno_location', 'pcap_realloc']

85 85 yy_get_next_buffer call site: 00140 /src/libpcap/build/scanner.c:4649
25 25 1 :

['gen_geneve_ll_check']

25 25 gen_prevlinkhdr_check call site: 00366 /src/libpcap/gencode.c:3164
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 54 pcap_compile call site: 00066 /src/libpcap/gencode.c:800
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_alloc_pcap_t call site: 00000 /src/libpcap/pcap.c:2498
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_fopen_offline_with_tstamp_precision call site: 00030 /src/libpcap/savefile.c:506
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_check_header call site: 00000 /src/libpcap/sf-pcap.c:185
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:461
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:615
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:646
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_next_packet call site: 00000 /src/libpcap/sf-pcap.c:698
15 15 2 :

['__errno_location', 'pcapint_fmt_errmsg_for_errno']

15 15 pcap_ng_check_header call site: 00000 /src/libpcap/sf-pcapng.c:822

Runtime coverage analysis

Covered functions
263
Functions that are reachable but not covered
80
Reachable functions
311
Percentage of reachable functions covered
74.28%
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 10
fmtutils.c 2
bpf_filter.c 2
extract.h 2
missing/strlcpy.c 1
pcap.c 9
gencode.c 154
build/scanner.c 24
build/grammar.c 2
scanner.l 2
nametoaddr.c 11
build/grammar.y 4
optimize.c 47

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_open /src/libpcap/pcap.c 6 ['char *', 'int', 'int', 'int', 'struct.pcap_rmtauth *', 'char *'] 8 0 265 46 16 148 0 811 676
pcap_ng_check_header /src/libpcap/sf-pcapng.c 5 ['char *', 'struct._IO_FILE *', 'int', 'char *', 'int *'] 6 0 678 72 23 41 0 254 219
pcap_findalldevs_ex /src/libpcap/pcap.c 4 ['char *', 'struct.pcap_rmtauth *', 'struct.pcap_if **', 'char *'] 9 0 476 60 23 75 0 389 175
netfilter_create /src/libpcap/pcap-netfilter-linux.c 3 ['char *', 'char *', 'int *'] 6 0 123 20 8 58 0 250 135
usb_create /src/libpcap/pcap-usb-linux.c 3 ['char *', 'char *', 'int *'] 6 0 119 18 8 56 0 216 75
pcap_check_header /src/libpcap/sf-pcap.c 5 ['char *', 'struct._IO_FILE *', 'int', 'char *', 'int *'] 6 0 649 77 25 31 0 196 49
pcap_dump_open_append /src/libpcap/sf-pcap.c 2 ['struct.pcap *', 'char *'] 3 0 432 60 20 17 0 70 45

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

Functions statically reachable by fuzzers
84.0%
451 / 534
Cyclomatic complexity statically reachable by fuzzers
92.0%
3381 / 3683

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

Directories in report

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