Fuzz introspector: libwget_netrc_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', 'fileno', 'rpl_fflush', '__errno_location', 'lseek']

35 35 rpl_fclose call site: 00047 /src/wget2/lib/fclose.c:66
10 10 4 :

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

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

['__errno_location', 'gettext']

6 6 getline_internal call site: 00037 /src/wget2/libwget/io.c:123
0 0 None 34 387 wget_netrc_db_load call site: 00018 /src/wget2/libwget/netrc.c:197
0 0 None 34 355 wget_netrc_db_load call site: 00019 /src/wget2/libwget/netrc.c:200
0 0 None 34 355 wget_netrc_db_load call site: 00044 /src/wget2/libwget/netrc.c:235
0 0 None 14 14 getline_internal call site: 00032 /src/wget2/libwget/io.c:67
0 0 None 12 12 getline_internal call site: 00033 /src/wget2/libwget/io.c:72
0 0 None 2 2 wget_strcmp call site: 00000 /src/wget2/libwget/utils.c:79
0 0 None 2 2 wget_strcmp call site: 00000 /src/wget2/libwget/utils.c:85
0 0 None 0 47 wget_netrc_db_add call site: 00064 /src/wget2/libwget/netrc.c:160
0 0 None 0 37 wget_netrc_db_add call site: 00064 /src/wget2/libwget/netrc.c:163

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 wget_netrc_db_init [function] [call site] 00001
2 wget_hashmap_create [function] [call site] 00002
3 wget_malloc [function] [call site] 00003
3 wget_calloc [function] [call site] 00004
3 rpl_free [function] [call site] 00005
4 __errno_location [call site] 00006
4 __errno_location [call site] 00007
2 hash_netrc [function] [call site] 00009
2 wget_calloc [function] [call site] 00010
2 wget_hashmap_free [function] [call site] 00011
3 wget_hashmap_clear [function] [call site] 00012
2 wget_hashmap_set_key_destructor [function] [call site] 00013
2 wget_netrc_free [function] [call site] 00014
3 wget_netrc_deinit [function] [call site] 00015
2 wget_hashmap_set_value_destructor [function] [call site] 00016
2 wget_netrc_free [function] [call site] 00017
1 wget_netrc_db_load [function] [call site] 00018
2 rpl_fopen [function] [call site] 00019
3 strlen [call site] 00020
3 open [call site] 00021
3 fdopen [call site] 00022
3 __errno_location [call site] 00023
3 close [call site] 00024
3 __errno_location [call site] 00025
3 orig_fopen [function] [call site] 00026
4 fopen [function] [call site] 00027
5 dlsym [call site] 00028
5 strcmp [call site] 00029
5 fmemopen [call site] 00030
2 wget_getline [function] [call site] 00031
3 getline_internal [function] [call site] 00032
4 wget_malloc [function] [call site] 00033
4 memchr [call site] 00034
4 memchr [call site] 00035
4 wget_realloc [function] [call site] 00036
4 __errno_location [call site] 00037
4 __errno_location [call site] 00038
4 gettext [call site] 00039
4 wget_error_printf [function] [call site] 00040
2 __ctype_b_loc [call site] 00041
2 __ctype_b_loc [call site] 00042
2 __ctype_b_loc [call site] 00043
2 wget_strmemdup [function] [call site] 00044
3 wget_malloc [function] [call site] 00045
2 rpl_fclose [function] [call site] 00046
3 fileno [call site] 00047
3 fclose [call site] 00048
3 __freading [call site] 00049
3 rpl_fflush [function] [call site] 00050
4 __freading [call site] 00051
4 fflush [call site] 00052
4 clear_ungetc_buffer_preserving_position [function] [call site] 00053
5 rpl_fseeko [function] [call site] 00054
6 fileno [call site] 00055
6 fseeko [call site] 00056
4 fflush [call site] 00057
3 __errno_location [call site] 00058
3 fclose [call site] 00059
3 __errno_location [call site] 00060
2 strcmp [call site] 00061
2 wget_memdup [function] [call site] 00062
3 wget_malloc [function] [call site] 00063
2 wget_netrc_db_add [function] [call site] 00064
3 wget_netrc_free [function] [call site] 00065
3 wget_debug_printf [function] [call site] 00066
3 wget_hashmap_put [function] [call site] 00067
4 hashmap_find_entry [function] [call site] 00068
4 hashmap_new_entry [function] [call site] 00069
5 wget_malloc [function] [call site] 00070
5 wget_calloc [function] [call site] 00071
5 hashmap_rehash [function] [call site] 00072
2 wget_netrc_init [function] [call site] 00073
3 wget_calloc [function] [call site] 00074
2 strcmp [call site] 00075
2 wget_strdup [function] [call site] 00076
3 strlen [call site] 00077
3 wget_memdup [function] [call site] 00078
2 __ctype_b_loc [call site] 00079
2 __ctype_b_loc [call site] 00080
2 strcmp [call site] 00081
2 wget_strmemdup [function] [call site] 00082
2 strcmp [call site] 00083
2 wget_strmemdup [function] [call site] 00084
2 strcmp [call site] 00085
2 wget_strmemdup [function] [call site] 00086
2 unescape_password [function] [call site] 00087
3 wget_malloc [function] [call site] 00088
2 strcmp [call site] 00089
2 atoi [call site] 00090
2 strcmp [call site] 00091
2 wget_strncasecmp_ascii [function] [call site] 00092
3 c_strncasecmp [function] [call site] 00093
2 strcmp [call site] 00096
2 wget_memdup [function] [call site] 00097
2 wget_netrc_db_add [function] [call site] 00098
2 rpl_fclose [function] [call site] 00099
2 wget_hashmap_size [function] [call site] 00100
2 wget_debug_printf [function] [call site] 00101
1 wget_netrc_get [function] [call site] 00102
2 wget_hashmap_get [function] [call site] 00103
3 hashmap_find_entry [function] [call site] 00104
1 wget_netrc_db_free [function] [call site] 00105
2 wget_netrc_db_deinit [function] [call site] 00106
3 wget_hashmap_free [function] [call site] 00107