Fuzz introspector: test_blkid_fuzz
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
511 525 24 :

['blkid_probe_get_sectorsize', 'parse_dos_extended', 'dos_partition_get_size', 'blkid_partition_is_logical', 'blkid_partlist_add_partition', 'blkid_partitions_do_subprobe', 'blkid_partition_get_type', 'blkid_partition_get_size', 'blkid_partition_set_type', 'blkid_partition_set_flags', 'blkid_partlist_increment_partno', 'blkid_partlist_get_partition', 'blkid_partition_gen_uuid', 'blkid_probe_is_tiny', 'blkid_partlist_new_parttable', 'dos_partition_get_start', 'ul_debug.2143', 'is_extended', 'blkid_partlist_numof_partitions', 'blkid_partition_is_extended', 'blkid_probe_get_partlist', 'blkid_parttable_set_id', 'blkid_partlist_set_partno', 'getpid']

511 525 probe_dos_pt call site: 00000 /src/util-linux/libblkid/src/partitions/dos.c:253
282 284 7 :

['parse_extended', 'memcmp', 'blkid_partlist_increment_partno', 'blkid_probe_get_partlist', 'blkid_partlist_new_parttable', 'parse_partition', 'is_id_common']

282 284 probe_atari_pt call site: 00000 /src/util-linux/libblkid/src/partitions/atari.c:253
98 183 2 :

['blkid_probe_get_buffer', 'sb_log_offset']

102 627 probe_btrfs call site: 00000 /src/util-linux/libblkid/src/superblocks/btrfs.c:255
85 159 11 :

['blkid_partition_set_name', 'blkid_partition_set_type_string', 'blkid_partlist_add_partition', 'ul_debug.2240', 'blkid_partlist_new_parttable', '__bswap_32.2241', 'get_mac_block', 'has_part_signature', 'blkid_probe_get_partlist', '__errno_location', 'getpid']

85 159 probe_mac_pt call site: 00000 /src/util-linux/libblkid/src/partitions/mac.c:113
84 202 17 :

['blkid_probe_verify_csum', 'blkid_partlist_add_partition', 'blkid_partlist_get_parent', 'blkid_partition_get_type', 'blkid_is_nested_dimension', '__errno_location', 'ul_debug.2094', 'bsd_checksum', 'blkid_partition_get_size', 'blkid_partition_set_type', 'blkid_partlist_new_parttable', '__uint16_identity.2095', 'blkid_probe_get_sector', 'blkid_probe_get_partlist', '__uint32_identity.2093', 'blkid_partition_get_start', 'getpid']

84 202 probe_bsd_pt call site: 00000 /src/util-linux/libblkid/src/partitions/bsd.c:54
66 68 10 :

['blkid_partition_set_flags', 'blkid_partlist_increment_partno', 'blkid_partlist_add_partition', 'blkid_partlist_new_parttable', '__bswap_16', 'blkid_probe_get_partlist', 'ul_debug.442', '__bswap_32.441', 'getpid', 'blkid_partition_set_type']

66 68 probe_sun_pt call site: 00000 /src/util-linux/libblkid/src/partitions/sun.c:42
54 56 6 :

['__bswap_32', 'blkid_partlist_increment_partno', 'blkid_probe_get_partlist', 'blkid_partlist_add_partition', 'blkid_partlist_new_parttable', 'blkid_partition_set_type']

54 56 probe_sgi_pt call site: 00000 /src/util-linux/libblkid/src/partitions/sgi.c:40
46 48 4 :

['blkid_partlist_add_partition', 'blkid_partlist_new_parttable', 'blkid_partlist_increment_partno', 'blkid_probe_get_partlist']

46 48 probe_ultrix_pt call site: 00000 /src/util-linux/libblkid/src/partitions/ultrix.c:63
37 37 1 :

['partitions_init_data']

828 1036 partitions_probe call site: 00000 /src/util-linux/libblkid/src/partitions/partitions.c:591
30 58 3 :

['blkid_probe_chain_reset_values', 'reset_partlist', 'blkid_probe_get_partlist']

34 114 idinfo_probe call site: 00000 /src/util-linux/libblkid/src/partitions/partitions.c:554
20 22 2 :

['blkid_partlist_new_parttable', 'blkid_probe_get_partlist']

20 22 probe_aix_pt call site: 00000 /src/util-linux/libblkid/src/partitions/aix.c:23
15 15 3 :

['ul_debug.1700', 'blkid_get_library_version', 'getpid']

23 23 blkid_init_debug call site: 00000 /src/util-linux/libblkid/src/init.c:55

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 mkostemp [call site] 00001
1 err [call site] 00002
1 write [call site] 00003
1 process_file [function] [call site] 00004
2 blkid_new_probe_from_filename [function] [call site] 00005
3 open [call site] 00006
3 blkid_new_probe [function] [call site] 00007
4 calloc [call site] 00008
4 getpid [call site] 00009
4 ul_debug [function] [call site] 00010
5 vfprintf [call site] 00011
5 fputc [call site] 00012
3 blkid_probe_set_device [function] [call site] 00013
4 blkid_reset_probe [function] [call site] 00014
5 blkid_probe_reset_values [function] [call site] 00015
6 list_empty [function] [call site] 00016
6 getpid [call site] 00017
6 list_empty [function] [call site] 00019
6 blkid_probe_free_value [function] [call site] 00020
7 getpid [call site] 00023
5 blkid_probe_set_wiper [function] [call site] 00025
6 getpid [call site] 00026
6 getpid [call site] 00028
5 blkid_probe_chain_reset_position [function] [call site] 00030
4 blkid_probe_reset_buffers [function] [call site] 00031
5 list_empty [function] [call site] 00032
5 getpid [call site] 00033
5 list_empty [function] [call site] 00035
5 getpid [call site] 00037
5 getpid [call site] 00039
4 close [call site] 00041
4 blkid_free_probe [function] [call site] 00042
5 close [call site] 00043
5 blkid_probe_reset_buffers [function] [call site] 00044
5 blkid_probe_reset_values [function] [call site] 00045
5 blkid_probe_reset_hints [function] [call site] 00046
6 list_empty [function] [call site] 00047
6 getpid [call site] 00048
6 list_empty [function] [call site] 00050
5 blkid_free_probe [function] [call site] 00052
6 getpid [call site] 00053
4 posix_fadvise [call site] 00055
4 fstat [call site] 00056
4 __errno_location [call site] 00057
4 blkdev_get_size [function] [call site] 00058
5 ioctl [call site] 00059
5 ioctl [call site] 00060
5 ioctl [call site] 00061
5 fstat [call site] 00062
5 __errno_location [call site] 00063
5 blkdev_find_size [function] [call site] 00064
6 blkdev_valid_offset [function] [call site] 00065
7 lseek [call site] 00066
7 read_all [function] [call site] 00067
8 read [call site] 00068
8 __errno_location [call site] 00069
8 xusleep [function] [call site] 00070
9 nanosleep [call site] 00071
6 __errno_location [call site] 00072
6 blkdev_valid_offset [function] [call site] 00073
6 blkdev_valid_offset [function] [call site] 00074
4 getpid [call site] 00075
4 sysfs_chrdev_devno_to_devname [function] [call site] 00077
5 gnu_dev_major [call site] 00078
5 ul_new_path [function] [call site] 00079
6 calloc [call site] 00080
6 getpid [call site] 00081
6 ul_debugobj [function] [call site] 00082
7 fprintf [call site] 00083
6 ul_unref_path [function] [call site] 00084
7 getpid [call site] 00085
7 ul_debugobj [function] [call site] 00086
7 ul_path_close_dirfd [function] [call site] 00087
8 __assert_fail [call site] 00088
8 getpid [call site] 00089
8 ul_debugobj [function] [call site] 00090
8 close [call site] 00091
5 ul_path_readlink [function] [call site] 00092
6 get_absdir [function] [call site] 00093
7 snprintf [call site] 00094
7 __errno_location [call site] 00095
6 __errno_location [call site] 00096
6 readlink [call site] 00097
6 ul_path_get_dirfd [function] [call site] 00098
7 __assert_fail [call site] 00099
7 __assert_fail [call site] 00100
7 get_absdir [function] [call site] 00101
7 __errno_location [call site] 00102
7 getpid [call site] 00103
7 ul_debugobj [function] [call site] 00104
7 open [call site] 00105
6 readlinkat [call site] 00106
5 ul_unref_path [function] [call site] 00107
5 strrchr [call site] 00108
5 strlen [call site] 00109
5 sysfs_devname_sys_to_dev [function] [call site] 00110
6 strchr [call site] 00111
4 strncmp [call site] 00112
4 getpid [call site] 00113
4 __errno_location [call site] 00115
4 getpid [call site] 00116
4 __errno_location [call site] 00118
4 ioctl [call site] 00119
4 fcntl [call site] 00120
4 ul_reopen [function] [call site] 00121
5 snprintf [call site] 00122
5 readlink [call site] 00123
5 __errno_location [call site] 00124
5 __assert_fail [call site] 00125
5 open [call site] 00126
4 __errno_location [call site] 00127
4 sysfs_devno_is_dm_private [function] [call site] 00128
5 ul_new_sysfs_path [function] [call site] 00129
6 ul_new_path [function] [call site] 00130
6 ul_path_set_prefix [function] [call site] 00131
7 __assert_fail [call site] 00132
7 strdup [call site] 00133
7 ul_debugobj [function] [call site] 00134
6 sysfs_blkdev_init_path [function] [call site] 00135
7 gnu_dev_major [call site] 00136
7 ul_path_set_dir [function] [call site] 00137
8 strdup [call site] 00138
8 close [call site] 00139
8 ul_debugobj [function] [call site] 00140
7 ul_path_get_dirfd [function] [call site] 00141
7 ul_path_get_dialect [function] [call site] 00142
7 getpid [call site] 00143
7 ul_debugobj [function] [call site] 00144
7 ul_path_set_dialect [function] [call site] 00145
8 getpid [call site] 00146
8 ul_debugobj [function] [call site] 00147
7 sysfs_blkdev_deinit_path [function] [call site] 00148
8 getpid [call site] 00149
8 ul_debugobj [function] [call site] 00150
8 ul_path_get_dialect [function] [call site] 00151
8 ul_unref_path [function] [call site] 00152
8 ul_path_set_dialect [function] [call site] 00153
7 ul_path_set_enoent_redirect [function] [call site] 00154
7 sysfs_blkdev_enoent_redirect [function] [call site] 00155
8 ul_path_get_dialect [function] [call site] 00156
8 ul_path_get_dirfd [function] [call site] 00157
8 getpid [call site] 00158
8 ul_debugobj [function] [call site] 00159
7 ul_debugobj [function] [call site] 00160
7 sysfs_blkdev_set_parent [function] [call site] 00161
8 ul_path_get_dialect [function] [call site] 00162
8 ul_unref_path [function] [call site] 00163
8 ul_ref_path [function] [call site] 00164
8 getpid [call site] 00165
8 ul_debugobj [function] [call site] 00166
6 ul_unref_path [function] [call site] 00167
6 getpid [call site] 00168
6 ul_debugobj [function] [call site] 00169
5 ul_path_read_string [function] [call site] 00170
6 ul_path_read [function] [call site] 00171
7 ul_path_open [function] [call site] 00172
8 open [call site] 00173
8 getpid [call site] 00174
8 ul_path_get_dirfd [function] [call site] 00176
8 openat [call site] 00177
8 __errno_location [call site] 00178
8 openat [call site] 00179
8 getpid [call site] 00180
8 ul_debugobj [function] [call site] 00181
7 __errno_location [call site] 00182
7 getpid [call site] 00183
7 __errno_location [call site] 00186
7 close [call site] 00187
7 __errno_location [call site] 00188
6 strdup [call site] 00189
5 strncmp [call site] 00190
5 strrchr [call site] 00191
5 strncmp [call site] 00192
5 ul_unref_path [function] [call site] 00193
4 getpid [call site] 00194
4 blkid_probe_is_tiny [function] [call site] 00196
4 blkid_probe_is_wholedisk [function] [call site] 00197
5 blkid_probe_get_devno [function] [call site] 00198
5 blkid_probe_get_wholedisk_devno [function] [call site] 00199
6 blkid_probe_get_devno [function] [call site] 00200
6 blkid_devno_to_wholedisk [function] [call site] 00201
7 sysfs_devno_to_wholedisk [function] [call site] 00202
8 ul_new_sysfs_path [function] [call site] 00203
8 sysfs_blkdev_get_wholedisk [function] [call site] 00204
9 ul_path_read_string [function] [call site] 00205
9 strsep [call site] 00206
9 strncasecmp [call site] 00207
9 get_dm_wholedisk [function] [call site] 00208
10 sysfs_blkdev_get_slave [function] [call site] 00209
11 ul_path_opendir [function] [call site] 00210
12 ul_path_open [function] [call site] 00211
12 getpid [call site] 00212
12 ul_debugobj [function] [call site] 00213
12 ul_path_get_dirfd [function] [call site] 00214
12 dup_fd_cloexec [function] [call site] 00215
13 fcntl [call site] 00216
13 fcntl [call site] 00217
13 fcntl [call site] 00218
13 __errno_location [call site] 00219
13 close [call site] 00220
12 fdopendir [call site] 00221
12 close [call site] 00222
12 rewinddir [call site] 00223
11 xreaddir [function] [call site] 00224
12 readdir [call site] 00225
12 strcmp [call site] 00226
12 strcmp [call site] 00227
11 strdup [call site] 00228
11 closedir [call site] 00229
11 closedir [call site] 00230
10 xstrncpy [function] [call site] 00231
11 strlen [call site] 00232
10 ul_path_get_prefix [function] [call site] 00233
10 __sysfs_devname_to_devno [function] [call site] 00234
11 __assert_fail [call site] 00235
11 stat [call site] 00236
11 strdup [call site] 00237
11 sysfs_devname_dev_to_sys [function] [call site] 00238
12 strchr [call site] 00239
11 strdup [call site] 00240
11 strncmp [call site] 00241
11 sysfs_devname_dev_to_sys [function] [call site] 00242
11 read_devno [function] [call site] 00243
12 fopen [call site] 00244
12 __isoc99_fscanf [call site] 00245
12 gnu_dev_makedev [call site] 00246
12 fclose [call site] 00247
11 snprintf [call site] 00248
11 read_devno [function] [call site] 00249
11 startswith [function] [call site] 00250
12 strncmp [call site] 00251
11 read_devno [function] [call site] 00252
11 snprintf [call site] 00253
11 read_devno [function] [call site] 00254
9 sysfs_blkdev_get_name [function] [call site] 00255
10 ul_path_readlink [function] [call site] 00256
10 strrchr [call site] 00257
10 strlen [call site] 00258
10 sysfs_devname_sys_to_dev [function] [call site] 00259
9 sysfs_blkdev_get_devno [function] [call site] 00260
10 ul_path_get_dialect [function] [call site] 00261
9 ul_path_readlink [function] [call site] 00262
9 stripoff_last_component [function] [call site] 00263
10 strrchr [call site] 00264
9 stripoff_last_component [function] [call site] 00265
9 sysfs_devname_sys_to_dev [function] [call site] 00266
9 ul_path_get_prefix [function] [call site] 00268
9 __sysfs_devname_to_devno [function] [call site] 00269
8 ul_unref_path [function] [call site] 00270
4 ioctl [call site] 00271
4 ioctl [call site] 00272
4 __errno_location [call site] 00273
4 ioctl [call site] 00274
4 __errno_location [call site] 00275
4 cdrom_size_correction [function] [call site] 00276
5 is_sector_readable [function] [call site] 00277
6 lseek [call site] 00278
6 read [call site] 00279
6 getpid [call site] 00280
6 __errno_location [call site] 00282
5 getpid [call site] 00283
5 getpid [call site] 00285
4 blkid_probe_get_hint [function] [call site] 00287
5 get_hint [function] [call site] 00288
6 list_empty [function] [call site] 00289
6 strcmp [call site] 00290
4 ioctl [call site] 00291
4 blkid_probe_set_hint [function] [call site] 00292
5 strchr [call site] 00293
5 blkid_parse_tag_string [function] [call site] 00294
6 getpid [call site] 00295
6 strchr [call site] 00297
6 strdup [call site] 00298
6 strrchr [call site] 00299
6 strdup [call site] 00300
6 getpid [call site] 00301
5 __errno_location [call site] 00303
5 strtoumax [call site] 00304
5 __errno_location [call site] 00305
5 getpid [call site] 00307
5 strdup [call site] 00309
5 list_add_tail [function] [call site] 00310
6 __list_add [function] [call site] 00311
5 getpid [call site] 00312
5 __errno_location [call site] 00314
4 ioctl [call site] 00315
4 getpid [call site] 00316
4 getpid [call site] 00318
4 blkid_probe_is_wholedisk [function] [call site] 00319
4 getpid [call site] 00321
3 close [call site] 00323
3 blkid_free_probe [function] [call site] 00324
2 blkid_probe_enable_partitions [function] [call site] 00325
2 blkid_probe_set_partitions_flags [function] [call site] 00326
2 blkid_probe_enable_superblocks [function] [call site] 00327
2 blkid_probe_set_superblocks_flags [function] [call site] 00328
2 blkid_do_safeprobe [function] [call site] 00329
3 blkid_probe_start [function] [call site] 00330
4 getpid [call site] 00331
4 blkid_probe_set_wiper [function] [call site] 00333
3 getpid [call site] 00334
3 blkid_probe_chain_reset_position [function] [call site] 00336
3 blkid_probe_chain_reset_position [function] [call site] 00337
3 blkid_probe_end [function] [call site] 00338
4 getpid [call site] 00339
4 blkid_probe_set_wiper [function] [call site] 00341
2 blkid_free_probe [function] [call site] 00342
1 close [call site] 00343
1 unlink [call site] 00344