Fuzz introspector: libwget_ocsp_fuzzer
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
33 33 5 :

['__freading', 'rpl_fflush', 'fileno', 'lseek', '__errno_location']

35 35 rpl_fclose call site: 00151 /src/wget2/lib/fclose.c:66
16 16 1 :

['wget_hashmap_remove']

16 30 ocsp_db_add_fingerprint_entry call site: 00249 /src/wget2/libwget/ocsp.c:282
16 16 1 :

['wget_hashmap_remove']

16 30 ocsp_db_add_host_entry call site: 00227 /src/wget2/libwget/ocsp.c:347
11 11 1 :

['buffer_realloc']

11 11 wget_buffer_memcat call site: 00038 /src/wget2/libwget/buffer.c:384
10 10 4 :

['open', 'fdopen', 'close', '__errno_location']

10 10 rpl_fopen call site: 00135 /src/wget2/lib/fopen.c:211
6 6 2 :

['gettext', '__errno_location']

6 6 getline_internal call site: 00202 /src/wget2/libwget/io.c:123
2 2 1 :

['gettext']

2 2 wget_ocsp_db_load call site: 00267 /src/wget2/libwget/ocsp.c:521
0 34 1 :

['rpl_fclose']

2 36 wget_update_file call site: 00190 /src/wget2/libwget/io.c:520
0 0 None 161 645 wget_buffer_vprintf_append call site: 00037 /src/wget2/libwget/buffer_printf.c:346
0 0 None 161 645 wget_buffer_vprintf_append call site: 00042 /src/wget2/libwget/buffer_printf.c:368
0 0 None 161 645 wget_buffer_vprintf_append call site: 00045 /src/wget2/libwget/buffer_printf.c:372
0 0 None 161 645 wget_buffer_vprintf_append call site: 00047 /src/wget2/libwget/buffer_printf.c:377

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 wget_ocsp_db_init [function] [call site] 00001
2 wget_strdup [function] [call site] 00002
3 strlen [call site] 00003
3 wget_memdup [function] [call site] 00004
4 wget_malloc [function] [call site] 00005
2 wget_hashmap_create [function] [call site] 00006
3 wget_malloc [function] [call site] 00007
3 wget_calloc [function] [call site] 00008
2 hash_ocsp [function] [call site] 00009
2 compare_ocsp [function] [call site] 00010
3 strcmp [call site] 00011
2 wget_hashmap_create [function] [call site] 00012
2 hash_ocsp [function] [call site] 00013
2 compare_ocsp [function] [call site] 00014
2 wget_hashmap_free [function] [call site] 00015
3 wget_hashmap_clear [function] [call site] 00016
2 wget_hashmap_free [function] [call site] 00017
2 wget_calloc [function] [call site] 00018
2 wget_hashmap_set_key_destructor [function] [call site] 00019
2 free_ocsp [function] [call site] 00020
3 deinit_ocsp [function] [call site] 00021
2 wget_hashmap_set_value_destructor [function] [call site] 00022
2 free_ocsp [function] [call site] 00023
2 wget_hashmap_set_key_destructor [function] [call site] 00024
2 free_ocsp [function] [call site] 00025
2 wget_hashmap_set_value_destructor [function] [call site] 00026
2 free_ocsp [function] [call site] 00027
2 wget_thread_mutex_init [function] [call site] 00028
3 wget_malloc [function] [call site] 00029
3 pthread_mutex_init [call site] 00030
1 wget_ocsp_db_load [function] [call site] 00031
2 wget_aprintf [function] [call site] 00032
3 wget_vasprintf [function] [call site] 00033
4 wget_buffer_init [function] [call site] 00034
5 wget_malloc [function] [call site] 00035
4 wget_buffer_vprintf [function] [call site] 00036
5 wget_buffer_vprintf_append [function] [call site] 00037
6 wget_buffer_memcat [function] [call site] 00038
7 buffer_realloc [function] [call site] 00039
8 wget_realloc [function] [call site] 00040
8 wget_malloc [function] [call site] 00041
6 wget_buffer_strcat [function] [call site] 00042
7 strlen [call site] 00043
7 wget_buffer_memcat [function] [call site] 00044
6 convert_dec_fast [function] [call site] 00045
7 wget_buffer_memcat [function] [call site] 00046
6 wget_buffer_memcat [function] [call site] 00047
6 convert_pointer [function] [call site] 00048
7 wget_buffer_memcat [function] [call site] 00049
7 wget_buffer_memcat [function] [call site] 00050
7 wget_buffer_memcat [function] [call site] 00051
6 wget_buffer_memset_append [function] [call site] 00052
7 buffer_realloc [function] [call site] 00053
6 read_flag_chars [function] [call site] 00054
6 read_field_width [function] [call site] 00055
7 c_isdigit [function] [call site] 00056
6 read_field_width [function] [call site] 00057
6 read_precision [function] [call site] 00058
6 read_precision [function] [call site] 00061
6 copy_string [function] [call site] 00062
7 wget_buffer_strcat [function] [call site] 00063
7 strnlen [call site] 00064
7 strlen [call site] 00065
7 wget_buffer_memcat [function] [call site] 00066
7 wget_buffer_memset_append [function] [call site] 00067
7 wget_buffer_memset_append [function] [call site] 00068
7 wget_buffer_memcat [function] [call site] 00069
7 wget_buffer_memcat [function] [call site] 00070
7 wget_buffer_memcat [function] [call site] 00071
6 copy_string [function] [call site] 00072
6 convert_dec [function] [call site] 00073
7 wget_buffer_memset_append [function] [call site] 00074
7 wget_buffer_memset_append [function] [call site] 00075
7 wget_buffer_memcat [function] [call site] 00076
7 wget_buffer_memset_append [function] [call site] 00077
7 wget_buffer_memcat [function] [call site] 00078
7 wget_buffer_memset_append [function] [call site] 00079
7 wget_buffer_memset_append [function] [call site] 00080
7 wget_buffer_memset_append [function] [call site] 00081
7 wget_buffer_memset_append [function] [call site] 00082
7 wget_buffer_memset_append [function] [call site] 00083
7 wget_buffer_memset_append [function] [call site] 00084
7 wget_buffer_memset_append [function] [call site] 00085
7 wget_buffer_memset_append [function] [call site] 00086
7 wget_buffer_memset_append [function] [call site] 00087
7 wget_buffer_memset_append [function] [call site] 00088
7 wget_buffer_memset_append [function] [call site] 00089
7 wget_buffer_memcat [function] [call site] 00090
7 wget_buffer_memset_append [function] [call site] 00091
7 wget_buffer_memset_append [function] [call site] 00092
7 wget_buffer_memcat [function] [call site] 00093
7 wget_buffer_memset_append [function] [call site] 00094
7 wget_buffer_memset_append [function] [call site] 00095
7 wget_buffer_memcat [function] [call site] 00096
6 convert_dec [function] [call site] 00097
6 convert_dec [function] [call site] 00098
6 convert_dec [function] [call site] 00099
6 convert_dec [function] [call site] 00100
6 convert_dec [function] [call site] 00101
6 wget_buffer_memset_append [function] [call site] 00102
4 wget_realloc [function] [call site] 00103
2 wget_update_file [function] [call site] 00104
3 wget_aprintf [function] [call site] 00105
3 base_name [function] [call site] 00106
4 last_component [function] [call site] 00107
4 base_len [function] [call site] 00108
5 strlen [call site] 00109
4 ximalloc [function] [call site] 00111
5 imalloc [function] [call site] 00112
6 _gl_alloc_nomem [function] [call site] 00113
7 __errno_location [call site] 00114
5 check_nonnull [function] [call site] 00115
6 xalloc_die [function] [call site] 00116
7 dgettext [call site] 00117
7 error [call site] 00118
7 abort [call site] 00119
3 getenv [call site] 00120
3 getenv [call site] 00121
3 getuid [call site] 00122
3 wget_aprintf [function] [call site] 00123
3 getuid [call site] 00124
3 wget_aprintf [function] [call site] 00125
3 open [call site] 00126
3 gettext [call site] 00127
3 __errno_location [call site] 00128
3 wget_error_printf [function] [call site] 00129
3 flock [call site] 00130
3 gettext [call site] 00131
3 __errno_location [call site] 00132
3 wget_error_printf [function] [call site] 00133
3 rpl_fopen [function] [call site] 00134
4 strlen [call site] 00135
4 open [call site] 00136
4 fdopen [call site] 00137
4 __errno_location [call site] 00138
4 close [call site] 00139
4 __errno_location [call site] 00140
4 orig_fopen [function] [call site] 00141
5 fopen [function] [call site] 00142
6 dlsym [call site] 00143
6 strcmp [call site] 00144
6 fmemopen [call site] 00145
3 __errno_location [call site] 00146
3 gettext [call site] 00147
3 __errno_location [call site] 00148
3 wget_error_printf [function] [call site] 00149
3 rpl_fclose [function] [call site] 00150
4 fileno [call site] 00151
4 fclose [call site] 00152
4 __freading [call site] 00153
4 fileno [call site] 00154
4 lseek [call site] 00155
4 rpl_fflush [function] [call site] 00156
5 __freading [call site] 00157
5 fflush [call site] 00158
5 clear_ungetc_buffer_preserving_position [function] [call site] 00159
6 rpl_fseeko [function] [call site] 00160
7 fileno [call site] 00161
7 lseek [call site] 00162
7 fseeko [call site] 00163
5 fflush [call site] 00164
4 __errno_location [call site] 00165
4 fclose [call site] 00166
4 __errno_location [call site] 00167
3 mkstemp [call site] 00168
3 gettext [call site] 00169
3 __errno_location [call site] 00170
3 wget_error_printf [function] [call site] 00171
3 fdopen [call site] 00172
3 unlink [call site] 00173
3 close [call site] 00174
3 gettext [call site] 00175
3 __errno_location [call site] 00176
3 wget_error_printf [function] [call site] 00177
3 unlink [call site] 00178
3 rpl_fclose [function] [call site] 00179
3 unlink [call site] 00180
3 gettext [call site] 00181
3 __errno_location [call site] 00182
3 wget_error_printf [function] [call site] 00183
3 rename [call site] 00184
3 gettext [call site] 00185
3 __errno_location [call site] 00186
3 wget_error_printf [function] [call site] 00187
3 gettext [call site] 00188
3 wget_error_printf [function] [call site] 00189
3 wget_debug_printf [function] [call site] 00190
3 rpl_fclose [function] [call site] 00191
3 close [call site] 00192
2 ocsp_db_load_hosts [function] [call site] 00193
3 ocsp_db_load [function] [call site] 00194
4 time [call site] 00195
4 wget_getline [function] [call site] 00196
5 getline_internal [function] [call site] 00197
6 wget_calloc [function] [call site] 00198
6 memchr [call site] 00199
6 memchr [call site] 00200
6 wget_realloc [function] [call site] 00201
6 __errno_location [call site] 00202
6 __errno_location [call site] 00203
6 gettext [call site] 00204
6 __errno_location [call site] 00205
6 wget_error_printf [function] [call site] 00206
5 read_fp [function] [call site] 00207
6 fread [call site] 00208
6 ferror [call site] 00209
4 __ctype_b_loc [call site] 00210
4 init_ocsp [function] [call site] 00211
5 wget_calloc [function] [call site] 00212
5 time [call site] 00213
4 __ctype_b_loc [call site] 00214
4 wget_strmemdup [function] [call site] 00215
5 wget_malloc [function] [call site] 00216
4 __ctype_b_loc [call site] 00217
4 atoll [call site] 00218
4 deinit_ocsp [function] [call site] 00219
4 __ctype_b_loc [call site] 00220
4 atoll [call site] 00221
4 __ctype_b_loc [call site] 00222
4 atoi [call site] 00223
4 wget_memdup [function] [call site] 00224
4 ocsp_db_add_host_entry [function] [call site] 00225
5 free_ocsp [function] [call site] 00226
5 wget_thread_mutex_lock [function] [call site] 00227
6 pthread_mutex_lock [call site] 00228
5 wget_hashmap_remove [function] [call site] 00229
6 hashmap_remove_entry [function] [call site] 00230
5 wget_debug_printf [function] [call site] 00231
5 free_ocsp [function] [call site] 00232
5 wget_hashmap_get [function] [call site] 00233
6 hashmap_find_entry [function] [call site] 00234
5 wget_debug_printf [function] [call site] 00235
5 free_ocsp [function] [call site] 00236
5 wget_hashmap_put [function] [call site] 00237
6 hashmap_find_entry [function] [call site] 00238
6 hashmap_new_entry [function] [call site] 00239
7 wget_malloc [function] [call site] 00240
7 wget_calloc [function] [call site] 00241
7 hashmap_rehash [function] [call site] 00242
5 wget_debug_printf [function] [call site] 00243
5 wget_thread_mutex_unlock [function] [call site] 00244
6 pthread_mutex_unlock [call site] 00245
4 wget_memdup [function] [call site] 00246
4 ocsp_db_add_fingerprint_entry [function] [call site] 00247
5 free_ocsp [function] [call site] 00248
5 wget_thread_mutex_lock [function] [call site] 00249
5 wget_hashmap_remove [function] [call site] 00250
5 wget_debug_printf [function] [call site] 00251
5 free_ocsp [function] [call site] 00252
5 wget_hashmap_get [function] [call site] 00253
5 wget_debug_printf [function] [call site] 00254
5 free_ocsp [function] [call site] 00255
5 wget_debug_printf [function] [call site] 00256
5 wget_hashmap_put [function] [call site] 00257
5 wget_thread_mutex_unlock [function] [call site] 00258
4 deinit_ocsp [function] [call site] 00259
4 gettext [call site] 00260
4 wget_error_printf [function] [call site] 00261
4 ferror [call site] 00262
2 gettext [call site] 00263
2 wget_error_printf [function] [call site] 00264
2 wget_debug_printf [function] [call site] 00265
2 wget_update_file [function] [call site] 00266
2 ocsp_db_load_fingerprints [function] [call site] 00267
3 ocsp_db_load [function] [call site] 00268
2 gettext [call site] 00269
2 wget_error_printf [function] [call site] 00270
2 wget_debug_printf [function] [call site] 00271
1 wget_ocsp_hostname_is_valid [function] [call site] 00272
2 wget_hashmap_get [function] [call site] 00273
2 time [call site] 00274
1 wget_ocsp_fingerprint_in_cache [function] [call site] 00275
2 wget_hashmap_get [function] [call site] 00276
2 time [call site] 00277
1 wget_ocsp_db_free [function] [call site] 00278
2 wget_ocsp_db_deinit [function] [call site] 00279
3 wget_thread_mutex_lock [function] [call site] 00280
3 wget_hashmap_free [function] [call site] 00281
3 wget_hashmap_free [function] [call site] 00282
3 wget_thread_mutex_unlock [function] [call site] 00283
3 wget_thread_mutex_destroy [function] [call site] 00284
4 pthread_mutex_destroy [call site] 00285