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

Fuzzer details

Fuzzer: fuzz_sonmp

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 35 49.2%
gold [1:9] 3 4.22%
yellow [10:29] 12 16.9%
greenyellow [30:49] 1 1.40%
lawngreen 50+ 20 28.1%
All colors 71 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
63 63 1 :

['log_warn']

63 155 sonmp_decode call site: 00052 /src/lldpd/src/daemon/protocols/sonmp.c:372
40 40 5 :

['date', 'translate', 'isatty', 'vsyslog', 'fflush']

40 40 vlog call site: 00007 /src/lldpd/src/log.c:155
2 2 1 :

['__errno_location']

128 220 sonmp_decode call site: 00043 /src/lldpd/src/daemon/protocols/sonmp.c:354
2 2 1 :

['__errno_location']

2 2 lldpd_alloc_mgmt call site: 00047 /src/lldpd/src/daemon/lldpd.c:278
0 147 4 :

['free', 'log_warnx', 'lldpd_port_cleanup', 'lldpd_chassis_cleanup']

0 147 sonmp_decode call site: 00054 /src/lldpd/src/daemon/protocols/sonmp.c:380
0 147 4 :

['free', 'log_warnx', 'lldpd_port_cleanup', 'lldpd_chassis_cleanup']

0 147 sonmp_decode call site: 00056 /src/lldpd/src/daemon/protocols/sonmp.c:386
0 0 None 63 155 sonmp_decode call site: 00037 /src/lldpd/src/daemon/protocols/sonmp.c:328
0 0 None 63 63 sonmp_decode call site: 00020 /src/lldpd/src/daemon/protocols/sonmp.c:292
0 0 None 63 63 sonmp_decode call site: 00030 /src/lldpd/src/daemon/protocols/sonmp.c:297
0 0 None 2 2 lldpd_alloc_mgmt call site: 00044 /src/lldpd/src/daemon/lldpd.c:269
0 0 None 2 2 lldpd_alloc_mgmt call site: 00045 /src/lldpd/src/daemon/lldpd.c:273
0 0 None 0 147 sonmp_decode call site: 00039 /src/lldpd/src/daemon/protocols/sonmp.c:337

Runtime coverage analysis

Covered functions
15
Functions that are reachable but not covered
22
Reachable functions
37
Percentage of reachable functions covered
40.54%
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
tests/fuzz_sonmp.c 2
src/log.c 8
src/daemon/protocols/sonmp.c 1
src/daemon/lldpd.c 1
src/lldpd-structs.c 7

Fuzzer: fuzz_lldp

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 38 25.3%
gold [1:9] 6 4.0%
yellow [10:29] 15 10.0%
greenyellow [30:49] 3 2.0%
lawngreen 50+ 88 58.6%
All colors 150 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
59 59 3 :

['logit', 'strerror', '__errno_location']

59 112 log_warn call site: 00025 /src/lldpd/src/log.c:203
40 40 5 :

['date', 'translate', 'isatty', 'vsyslog', 'fflush']

40 40 vlog call site: 00007 /src/lldpd/src/log.c:155
2 2 1 :

['__errno_location']

2 2 lldpd_alloc_mgmt call site: 00075 /src/lldpd/src/daemon/lldpd.c:278
0 0 None 72 3424 lldp_decode call site: 00133 /src/lldpd/src/daemon/protocols/lldp.c:1256
0 0 None 72 3424 lldp_decode call site: 00134 /src/lldpd/src/daemon/protocols/lldp.c:1266
0 0 None 59 59 log_warn call site: 00021 /src/lldpd/src/log.c:198
0 0 None 2 2 lldpd_alloc_mgmt call site: 00072 /src/lldpd/src/daemon/lldpd.c:269
0 0 None 0 155 lldp_decode call site: 00052 /src/lldpd/src/daemon/protocols/lldp.c:714
0 0 None 0 155 lldp_decode call site: 00060 /src/lldpd/src/daemon/protocols/lldp.c:764
0 0 None 0 155 lldp_decode call site: 00077 /src/lldpd/src/daemon/protocols/lldp.c:821
0 0 None 0 155 lldp_decode call site: 00083 /src/lldpd/src/daemon/protocols/lldp.c:847
0 0 None 0 155 lldp_decode call site: 00087 /src/lldpd/src/daemon/protocols/lldp.c:859

Runtime coverage analysis

Covered functions
18
Functions that are reachable but not covered
21
Reachable functions
39
Percentage of reachable functions covered
46.15%
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
tests/fuzz_lldp.c 2
src/log.c 9
src/daemon/protocols/lldp.c 2
src/daemon/lldpd.c 1
src/lldpd-structs.c 7

Fuzzer: fuzz_edp

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 36 39.5%
gold [1:9] 4 4.39%
yellow [10:29] 6 6.59%
greenyellow [30:49] 2 2.19%
lawngreen 50+ 43 47.2%
All colors 91 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
40 40 5 :

['date', 'translate', 'isatty', 'vsyslog', 'fflush']

40 40 vlog call site: 00007 /src/lldpd/src/log.c:155
2 2 1 :

['__errno_location']

2 2 lldpd_alloc_mgmt call site: 00070 /src/lldpd/src/daemon/lldpd.c:278
0 0 None 63 155 edp_decode call site: 00043 /src/lldpd/src/daemon/protocols/edp.c:302
0 0 None 63 155 edp_decode call site: 00052 /src/lldpd/src/daemon/protocols/edp.c:353
0 0 None 63 155 edp_decode call site: 00054 /src/lldpd/src/daemon/protocols/edp.c:360
0 0 None 63 155 edp_decode call site: 00056 /src/lldpd/src/daemon/protocols/edp.c:371
0 0 None 63 155 edp_decode call site: 00058 /src/lldpd/src/daemon/protocols/edp.c:382
0 0 None 63 155 edp_decode call site: 00063 /src/lldpd/src/daemon/protocols/edp.c:408
0 0 None 63 155 edp_decode call site: 00066 /src/lldpd/src/daemon/protocols/edp.c:421
0 0 None 63 155 edp_decode call site: 00073 /src/lldpd/src/daemon/protocols/edp.c:428
0 0 None 63 63 edp_decode call site: 00020 /src/lldpd/src/daemon/protocols/edp.c:239
0 0 None 63 63 edp_decode call site: 00030 /src/lldpd/src/daemon/protocols/edp.c:244

Runtime coverage analysis

Covered functions
16
Functions that are reachable but not covered
21
Reachable functions
37
Percentage of reachable functions covered
43.24%
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
tests/fuzz_edp.c 2
src/log.c 9
src/daemon/protocols/edp.c 1
src/daemon/lldpd.c 1
src/lldpd-structs.c 7

Fuzzer: fuzz_cdp

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 43 39.0%
gold [1:9] 4 3.63%
yellow [10:29] 5 4.54%
greenyellow [30:49] 1 0.90%
lawngreen 50+ 57 51.8%
All colors 110 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
60 60 2 :

['memcmp', 'log_info']

108 1914 cdp_decode call site: 00036 /src/lldpd/src/daemon/protocols/cdp.c:329
59 59 3 :

['logit', 'strerror', '__errno_location']

59 112 log_warn call site: 00028 /src/lldpd/src/log.c:203
40 40 5 :

['date', 'translate', 'isatty', 'vsyslog', 'fflush']

40 40 vlog call site: 00010 /src/lldpd/src/log.c:155
2 2 1 :

['__errno_location']

2 2 lldpd_alloc_mgmt call site: 00064 /src/lldpd/src/daemon/lldpd.c:278
0 63 1 :

['log_warn']

0 155 cdp_decode call site: 00092 /src/lldpd/src/daemon/protocols/cdp.c:613
0 63 1 :

['log_warn']

0 155 cdp_decode call site: 00094 /src/lldpd/src/daemon/protocols/cdp.c:620
0 63 1 :

['log_warn']

0 155 cdp_decode call site: 00096 /src/lldpd/src/daemon/protocols/cdp.c:628
0 0 None 59 59 log_warn call site: 00024 /src/lldpd/src/log.c:198
0 0 None 44 1674 cdp_decode call site: 00073 /src/lldpd/src/daemon/protocols/cdp.c:521
0 0 None 2 220 cdp_decode call site: 00060 /src/lldpd/src/daemon/protocols/cdp.c:480
0 0 None 2 2 lldpd_alloc_mgmt call site: 00061 /src/lldpd/src/daemon/lldpd.c:269
0 0 None 2 2 lldpd_alloc_mgmt call site: 00062 /src/lldpd/src/daemon/lldpd.c:273

Runtime coverage analysis

Covered functions
18
Functions that are reachable but not covered
23
Reachable functions
41
Percentage of reachable functions covered
43.9%
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
tests/fuzz_cdp.c 2
src/log.c 9
src/daemon/protocols/cdp.c 3
src/daemon/lldpd.c 1
src/lldpd-structs.c 7

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
levent_loop /src/lldpd/src/daemon/event.c 1 ['struct.lldpd.129 *'] 25 0 75 16 6 448 0 2383 2262
_lldp_send /src/lldpd/src/daemon/protocols/lldp.c 10 ['struct.lldpd.266 *', 'struct.lldpd_hardware.260 *', 'char', 'char *', 'int', 'char', 'char *', 'int', 'int', 'int'] 5 0 6151 885 358 27 3 805 725
bufferevent_socket_connect_hostname /src/lldpd/libevent/bufferevent_sock.c 5 ['struct.bufferevent.740 *', 'struct.evdns_base *', 'int', 'char *', 'int'] 19 0 121 16 7 148 0 729 251
fdp_send /src/lldpd/src/daemon/protocols/cdp.c 2 ['struct.lldpd.308 *', 'struct.lldpd_hardware.302 *'] 6 0 20 3 2 28 0 238 148
bufferevent_filter_new /src/lldpd/libevent/bufferevent_filter.c 6 ['struct.bufferevent.977 *', 'func_type *', 'func_type *', 'int', 'func_type *', 'char *'] 19 0 188 19 8 151 0 734 137
priv_init /src/lldpd/src/daemon/priv.c 4 ['char *', 'int', 'int', 'int'] 7 0 139 19 20 66 0 240 118
edp_send /src/lldpd/src/daemon/protocols/edp.c 2 ['struct.lldpd.351 *', 'struct.lldpd_hardware.345 *'] 5 0 1863 277 115 29 0 215 117
event_reinit /src/lldpd/libevent/event.c 1 ['struct.event_base *'] 10 0 334 49 17 99 0 463 111
evutil_secure_rng_get_bytes /src/lldpd/libevent/evutil_rand.c 2 ['char *', 'size_t'] 9 0 20 3 2 24 0 114 100
evbuffer_readline /src/lldpd/libevent/buffer.c 1 ['struct.evbuffer *'] 12 0 16 3 2 70 0 342 87

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

Functions statically reachable by fuzzers
57.9%
517 / 899
Cyclomatic complexity statically reachable by fuzzers
66.0%
3852 / 5808

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/lldpd/src/ctl.c [] []
/src/lldpd/libevent/bufferevent_ratelim.c [] []
/src/lldpd/tests/fuzz_edp.c ['fuzz_edp'] ['fuzz_edp']
/src/lldpd/libevent/evutil_time.c [] []
/src/lldpd/libevent/bufferevent_pair.c [] []
/src/lldpd/src/daemon/forward-linux.c [] []
/src/lldpd/src/compat/strlcpy.c [] []
/src/lldpd/tests/fuzz_lldp.c ['fuzz_lldp'] ['fuzz_lldp']
/src/lldpd/src/lldpd-structs.c ['fuzz_sonmp', 'fuzz_lldp', 'fuzz_edp', 'fuzz_cdp'] ['fuzz_sonmp', 'fuzz_lldp', 'fuzz_edp', 'fuzz_cdp']
/src/lldpd/libevent/signal.c [] []
/src/lldpd/src/daemon/interfaces.c [] []
/src/lldpd/src/daemon/bitmap.c [] []
/src/lldpd/src/daemon/protocols/lldp.c ['fuzz_lldp'] ['fuzz_lldp']
/src/lldpd/src/log.c ['fuzz_sonmp', 'fuzz_lldp', 'fuzz_edp', 'fuzz_cdp'] ['fuzz_sonmp', 'fuzz_lldp', 'fuzz_edp', 'fuzz_cdp']
/src/lldpd/libevent/evutil.c [] []
/src/lldpd/libevent/strlcpy.c [] []
/src/lldpd/src/daemon/frame.c [] []
/src/lldpd/libevent/./minheap-internal.h [] []
/src/lldpd/libevent/bufferevent_filter.c [] []
/src/lldpd/src/daemon/privsep_io.c [] []
/src/lldpd/libevent/epoll.c [] []
/src/lldpd/src/daemon/netlink.c [] []
/src/lldpd/libevent/./bufferevent-internal.h [] []
/src/lldpd/src/version.c [] []
/src/lldpd/src/daemon/privsep_fd.c [] []
/src/lldpd/libevent/select.c [] []
/src/lldpd/src/daemon/dmi-linux.c [] []
/src/lldpd/src/compat/setproctitle.c [] []
/src/lldpd/libevent/././arc4random.c [] []
/src/lldpd/src/compat/strtonum.c [] []
/src/lldpd/src/./lldpd-structs.h [] []
/src/lldpd/src/daemon/protocols/cdp.c ['fuzz_cdp'] ['fuzz_cdp']
/src/lldpd/tests/fuzz_cdp.c ['fuzz_cdp'] ['fuzz_cdp']
/src/lldpd/src/daemon/priv-linux.c [] []
/src/lldpd/libevent/evutil_rand.c [] []
/src/lldpd/src/marshal.c [] []
/src/lldpd/libevent/event.c [] []
/src/lldpd/libevent/log.c [] []
/src/lldpd/libevent/poll.c [] []
/src/lldpd/src/daemon/lldpd.c ['fuzz_sonmp', 'fuzz_lldp', 'fuzz_edp', 'fuzz_cdp'] ['fuzz_sonmp', 'fuzz_lldp', 'fuzz_edp', 'fuzz_cdp']
/src/lldpd/src/daemon/priv.c [] []
/src/lldpd/libevent/evmap.c [] []
/src/lldpd/libevent/buffer.c [] []
/src/lldpd/src/daemon/privsep.c [] []
/src/lldpd/tests/fuzz_sonmp.c ['fuzz_sonmp'] ['fuzz_sonmp']
/src/lldpd/src/daemon/pattern.c [] []
/src/lldpd/src/daemon/protocols/edp.c ['fuzz_edp'] ['fuzz_edp']
/src/lldpd/libevent/bufferevent.c [] []
/src/lldpd/src/daemon/event.c [] []
/src/lldpd/src/daemon/interfaces-linux.c [] []
/src/lldpd/libevent/bufferevent_sock.c [] []
/src/lldpd/src/daemon/protocols/sonmp.c ['fuzz_sonmp'] ['fuzz_sonmp']
/src/lldpd/src/daemon/client.c [] []

Directories in report

Directory
/src/lldpd/src/compat/
/src/lldpd/libevent/././
/src/lldpd/libevent/
/src/lldpd/src/
/src/lldpd/src/./
/src/lldpd/src/daemon/
/src/lldpd/tests/
/src/lldpd/libevent/./
/src/lldpd/src/daemon/protocols/