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 :

['log_info', 'memcmp']

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

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

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

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

40 40 vlog call site: 00010 /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:279
0 63 1 :

['log_warn']

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

['log_warn']

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

['log_warn']

0 155 cdp_decode call site: 00102 /src/lldpd/src/daemon/protocols/cdp.c:628
0 0 None 59 59 log_warn call site: 00026 /src/lldpd/src/log.c:198
0 0 None 44 1674 cdp_decode call site: 00079 /src/lldpd/src/daemon/protocols/cdp.c:521
0 0 None 2 220 cdp_decode call site: 00066 /src/lldpd/src/daemon/protocols/cdp.c:480
0 0 None 2 2 lldpd_alloc_mgmt call site: 00067 /src/lldpd/src/daemon/lldpd.c:270
0 0 None 2 2 lldpd_alloc_mgmt call site: 00068 /src/lldpd/src/daemon/lldpd.c:274

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 translate [function] [call site] 00017
5 isatty [call site] 00018
4 isatty [call site] 00019
4 asprintf [call site] 00020
4 vfprintf [call site] 00021
4 fprintf [call site] 00022
4 vfprintf [call site] 00023
4 fflush [call site] 00024
2 calloc [call site] 00025
2 log_warn [function] [call site] 00026
3 __errno_location [call site] 00027
3 strerror [call site] 00028
3 __errno_location [call site] 00031
3 strerror [call site] 00032
3 asprintf [call site] 00033
3 __errno_location [call site] 00035
3 strerror [call site] 00036
2 calloc [call site] 00039
2 memcmp [call site] 00042
2 memcmp [call site] 00043
2 ntohs [call site] 00046
2 ntohs [call site] 00049
2 log_debug [function] [call site] 00050
2 log_warnx [function] [call site] 00051
2 log_warnx [function] [call site] 00052
2 ntohs [call site] 00053
2 ntohs [call site] 00054
2 log_warnx [function] [call site] 00055
2 calloc [call site] 00056
2 log_warnx [function] [call site] 00059
2 ntohl [call site] 00060
2 ntohs [call site] 00063
2 ntohs [call site] 00065
2 lldpd_alloc_mgmt [function] [call site] 00066
3 log_debug [function] [call site] 00067
3 __errno_location [call site] 00068
3 __errno_location [call site] 00069
3 calloc [call site] 00070
3 __errno_location [call site] 00071
2 __errno_location [call site] 00072
2 calloc [call site] 00076
2 calloc [call site] 00078
2 strncmp [call site] 00080
2 strncmp [call site] 00081
2 strncmp [call site] 00082
2 log_warnx [function] [call site] 00083
2 ntohl [call site] 00084
2 log_warnx [function] [call site] 00085
2 calloc [call site] 00086
2 ntohs [call site] 00088
2 asprintf [call site] 00089
2 log_warnx [function] [call site] 00091
2 ntohs [call site] 00092
2 ntohs [call site] 00093
2 ntohl [call site] 00094
2 log_debug [function] [call site] 00095
2 ntohs [call site] 00096
2 log_debug [function] [call site] 00097
2 calloc [call site] 00098
2 calloc [call site] 00100
2 calloc [call site] 00102
2 log_warnx [function] [call site] 00104
2 lldpd_chassis_cleanup [function] [call site] 00105
3 lldpd_chassis_mgmt_cleanup [function] [call site] 00106
4 log_debug [function] [call site] 00107
3 log_debug [function] [call site] 00108
2 lldpd_port_cleanup [function] [call site] 00109
3 lldpd_vlan_cleanup [function] [call site] 00110
3 lldpd_ppvid_cleanup [function] [call site] 00111
3 lldpd_pi_cleanup [function] [call site] 00112
3 lldpd_custom_list_cleanup [function] [call site] 00113
1 lldpd_port_cleanup [function] [call site] 00114
1 lldpd_chassis_cleanup [function] [call site] 00115