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

Fuzzer details

Fuzzer: FuzzDecode

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 72 25.2%
gold [1:9] 7 2.45%
yellow [10:29] 26 9.12%
greenyellow [30:49] 8 2.80%
lawngreen 50+ 172 60.3%
All colors 285 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 :

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

59 112 log_warn call site: 00024 /src/lldpd/src/log.c:202
2 2 1 :

['vsyslog']

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

['__errno_location']

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

['__errno_location']

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

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

0 147 sonmp_decode call site: 00234 /src/lldpd/src/daemon/protocols/sonmp.c:378
0 147 4 :

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

0 147 sonmp_decode call site: 00236 /src/lldpd/src/daemon/protocols/sonmp.c:384
0 63 1 :

['log_warn']

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

['log_warn']

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

['log_warn']

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

['log_warn']

0 155 sonmp_decode call site: 00231 /src/lldpd/src/daemon/protocols/sonmp.c:369
0 58 1 :

['log_info']

0 150 cdp_decode call site: 00155 /src/lldpd/src/daemon/protocols/cdp.c:332
0 0 None 72 3424 lldp_decode call site: 00132 /src/lldpd/src/daemon/protocols/lldp.c:1280

Runtime coverage analysis

Covered functions
23
Functions that are reachable but not covered
22
Reachable functions
45
Percentage of reachable functions covered
51.11%
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
FuzzDecode.c 1
src/compat/strlcpy.c 1
src/daemon/protocols/lldp.c 2
src/log.c 8
src/daemon/lldpd.c 1
src/lldpd-structs.c 7
src/daemon/protocols/cdp.c 1
src/daemon/protocols/sonmp.c 1
src/daemon/protocols/edp.c 1
src/daemon/frame.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
lldpd_main /src/lldpd/src/daemon/lldpd.c 3 ['int ', 'char **', 'char **'] 15 0 1546 237 59 524 0 3100 2970
bufferevent_socket_connect_hostname /src/lldpd/libevent/bufferevent_sock.c 5 ['struct.bufferevent.744 *', 'struct.evdns_base *', 'int ', 'char *', 'int '] 7 0 121 16 7 148 0 729 247
fdp_send /src/lldpd/src/daemon/protocols/cdp.c 2 ['struct.lldpd.95 *', 'struct.lldpd_hardware.89 *'] 4 0 20 3 2 28 0 238 142
bufferevent_filter_new /src/lldpd/libevent/bufferevent_filter.c 6 ['struct.bufferevent.981 *', 'func_type *', 'func_type *', 'int ', 'func_type *', 'char *'] 6 0 188 19 8 151 0 734 137
edp_send /src/lldpd/src/daemon/protocols/edp.c 2 ['struct.lldpd.53 *', 'struct.lldpd_hardware.47 *'] 3 0 1863 277 115 29 0 215 117
event_reinit /src/lldpd/libevent/event.c 1 ['struct.event_base *'] 6 0 334 49 17 99 0 463 109
evutil_secure_rng_get_bytes /src/lldpd/libevent/evutil_rand.c 2 ['char *', 'size_t '] 4 0 20 3 2 24 0 114 100
evbuffer_readline /src/lldpd/libevent/buffer.c 1 ['struct.evbuffer *'] 9 0 16 3 2 70 0 342 87
client_handle_set_configuration /src/lldpd/src/daemon/client.c 6 ['struct.lldpd *', 'int *', 'char *', 'int ', 'char **', 'int *'] 7 0 1288 164 63 80 0 365 78
epoll_dispatch /src/lldpd/libevent/epoll.c 2 ['struct.event_base.880 *', 'struct.timeval *'] 6 0 430 69 24 31 0 130 67

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

Functions statically reachable by fuzzers
60.8%
551/905
Cyclomatic complexity statically reachable by fuzzers
70.7%
4178 / 5907

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

Directories in report

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

Function call coverage

This section shows a chosen list of functions / methods calls and their relative coverage information. By static analysis of the target project code, all of these function call and their caller information, including the source file or class and line number that initiate the call are captured. Column 1 is the function name of that selected functions or methods. Column 2 of each row indicate if the target function covered by any fuzzer calltree information. Column 3 lists all fuzzers (or no fuzzers at all) that have coered that particular function call dynamically. Column 4 shows list of parent function for the specific function call, while column 5 shows possible blocker functions that make the fuzzers fail to reach the specific functions. Both column 4 and 5 will only show information if none of the fuzzers cover the target function calls.

Function in each files in report

Target sink Callsite location Reached by fuzzer Function call path Covered by fuzzer Possible branch blockers
execvp Not in fuzzer provided call tree []
Parent functions Callpaths
lldpd_get_lsb_release
in /src/lldpd/src/daemon/lldpd.c:787
Path 1
0
Blocker function Arguments type Return type Constants touched
lldpd_main
in /src/lldpd/src/daemon/lldpd.c:1536
['int ', 'char **', 'char **'] int []
execl Not in fuzzer provided call tree []
Parent functions Callpaths
lldpd_configure
in /src/lldpd/src/daemon/lldpd.c:1379
Path 1
0
Blocker function Arguments type Return type Constants touched
lldpd_main
in /src/lldpd/src/daemon/lldpd.c:1536
['int ', 'char **', 'char **'] int []