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

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 :

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

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

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

40 40 vlog call site: 00010 /src/lldpd/src/log.c:154
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:197
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

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 log_register [function] [call site] 00001
1 donothing [function] [call site] 00002
1 cdpv2_guess [function] [call site] 00003
2 cdp_guess [function] [call site] 00004
3 memcmp [call site] 00005
1 cdp_decode [function] [call site] 00006
2 log_debug [function] [call site] 00007
3 log_debug_accept_token [function] [call site] 00008
4 strcmp [call site] 00009
3 vlog [function] [call site] 00010
4 vasprintf [call site] 00011
4 vsyslog [call site] 00012
4 date [function] [call site] 00013
5 time [call site] 00014
5 localtime [call site] 00015
5 strftime [call site] 00016
4 isatty [call site] 00017
4 asprintf [call site] 00018
4 vfprintf [call site] 00019
4 fprintf [call site] 00020
4 vfprintf [call site] 00021
4 fflush [call site] 00022
2 calloc [call site] 00023
2 log_warn [function] [call site] 00024
3 __errno_location [call site] 00025
3 __errno_location [call site] 00028
3 __errno_location [call site] 00030
2 calloc [call site] 00033
2 memcmp [call site] 00036
2 memcmp [call site] 00037
2 ntohs [call site] 00040
2 ntohs [call site] 00043
2 log_debug [function] [call site] 00044
2 log_warnx [function] [call site] 00045
2 log_warnx [function] [call site] 00046
2 ntohs [call site] 00047
2 ntohs [call site] 00048
2 log_warnx [function] [call site] 00049
2 calloc [call site] 00050
2 log_warnx [function] [call site] 00053
2 ntohl [call site] 00054
2 ntohs [call site] 00057
2 ntohs [call site] 00059
2 lldpd_alloc_mgmt [function] [call site] 00060
3 log_debug [function] [call site] 00061
3 __errno_location [call site] 00062
3 __errno_location [call site] 00063
3 calloc [call site] 00064
3 __errno_location [call site] 00065
2 __errno_location [call site] 00066
2 calloc [call site] 00070
2 calloc [call site] 00072
2 strncmp [call site] 00074
2 strncmp [call site] 00075
2 strncmp [call site] 00076
2 log_warnx [function] [call site] 00077
2 ntohl [call site] 00078
2 log_warnx [function] [call site] 00079
2 calloc [call site] 00080
2 ntohs [call site] 00082
2 asprintf [call site] 00083
2 log_warnx [function] [call site] 00085
2 ntohs [call site] 00086
2 ntohs [call site] 00087
2 ntohl [call site] 00088
2 log_debug [function] [call site] 00089
2 ntohs [call site] 00090
2 log_debug [function] [call site] 00091
2 calloc [call site] 00092
2 calloc [call site] 00094
2 calloc [call site] 00096
2 log_warnx [function] [call site] 00098
2 lldpd_chassis_cleanup [function] [call site] 00099
3 lldpd_chassis_mgmt_cleanup [function] [call site] 00100
4 log_debug [function] [call site] 00101
3 log_debug [function] [call site] 00102
2 lldpd_port_cleanup [function] [call site] 00103
3 lldpd_vlan_cleanup [function] [call site] 00104
3 lldpd_ppvid_cleanup [function] [call site] 00105
3 lldpd_pi_cleanup [function] [call site] 00106
3 lldpd_custom_list_cleanup [function] [call site] 00107
1 lldpd_port_cleanup [function] [call site] 00108
1 lldpd_chassis_cleanup [function] [call site] 00109