Fuzz introspector: spng_read_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
14 14 2 :

['byte_swap', 'crc_word_big']

14 14 crc32_z call site: 00024 /src/zlib/crc32.c:788
2 2 1 :

['memcmp']

2 2 trns_row call site: 00421 /src/libspng/spng/spng.c:1822
0 474 6 :

['adler32', 'inflate_fast', 'crc32', 'updatewindow', 'inflate_table', 'fixedtables']

0 474 inflate call site: 00170 /src/zlib/inflate.c:855
0 36 2 :

['crc32', 'adler32']

0 36 inflate call site: 00179 /src/zlib/inflate.c:1293
0 4 2 :

['spng__iter_init', 'get_sample']

0 4 trns_row call site: 00424 /src/libspng/spng/spng.c:1843
0 2 1 :

['get_sample']

0 2 unpack_scanline call site: 00413 /src/libspng/spng/spng.c:2011
0 0 None 0 474 inflate call site: 00158 /src/zlib/inflate.c:661
0 0 None 0 474 inflate call site: 00158 /src/zlib/inflate.c:667
0 0 None 0 474 inflate call site: 00160 /src/zlib/inflate.c:676
0 0 None 0 474 inflate call site: 00160 /src/zlib/inflate.c:694
0 0 None 0 474 inflate call site: 00176 /src/zlib/inflate.c:1227
0 0 None 0 474 inflate call site: 00178 /src/zlib/inflate.c:1231

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 spng_ctx_new [function] [call site] 00001
2 spng_ctx_new2 [function] [call site] 00002
1 fmemopen [call site] 00003
1 spng_set_png_file [function] [call site] 00004
2 spng_set_png_stream [function] [call site] 00005
3 spng__malloc [function] [call site] 00006
2 spng_set_png_stream [function] [call site] 00007
1 spng_set_png_stream [function] [call site] 00008
1 buffer_read_fn(spng_ctx*, void*, void*, unsigned long) [function] [call site] 00009
1 spng_set_png_buffer [function] [call site] 00010
2 buffer_read_fn [function] [call site] 00011
1 spng_set_image_limits [function] [call site] 00012
1 spng_set_chunk_limits [function] [call site] 00013
1 spng_set_crc_action [function] [call site] 00014
1 spng_set_option [function] [call site] 00015
1 spng_decoded_image_size [function] [call site] 00016
2 read_chunks [function] [call site] 00017
3 read_ihdr [function] [call site] 00018
4 read_data [function] [call site] 00019
4 memcmp [call site] 00020
4 memcmp [call site] 00022
4 check_ihdr [function] [call site] 00040
4 num_channels [function] [call site] 00041
4 calculate_subimages [function] [call site] 00042
5 calculate_scanline_width [function] [call site] 00043
6 num_channels [function] [call site] 00044
3 decode_err [function] [call site] 00045
3 read_non_idat_chunks [function] [call site] 00046
4 read_header [function] [call site] 00047
5 read_and_check_crc [function] [call site] 00048
6 read_data [function] [call site] 00049
6 is_critical_chunk [function] [call site] 00051
5 read_data [function] [call site] 00052
5 is_critical_chunk [function] [call site] 00054
4 memcmp [call site] 00057
4 discard_chunk_bytes [function] [call site] 00058
5 read_chunk_bytes [function] [call site] 00059
5 read_chunk_bytes [function] [call site] 00062
4 is_small_chunk [function] [call site] 00063
5 memcmp [call site] 00064
5 memcmp [call site] 00065
5 memcmp [call site] 00066
5 memcmp [call site] 00067
5 memcmp [call site] 00068
5 memcmp [call site] 00069
5 memcmp [call site] 00070
5 memcmp [call site] 00071
5 memcmp [call site] 00072
5 memcmp [call site] 00073
5 memcmp [call site] 00074
4 read_chunk_bytes [function] [call site] 00075
4 is_critical_chunk [function] [call site] 00076
4 memcmp [call site] 00077
4 check_plte [function] [call site] 00078
4 memcmp [call site] 00079
4 read_and_check_crc [function] [call site] 00080
4 memcmp [call site] 00081
4 memcmp [call site] 00082
4 check_chrm_int [function] [call site] 00091
4 memcmp [call site] 00092
4 memcmp [call site] 00094
4 check_sbit [function] [call site] 00095
4 memcmp [call site] 00096
4 memcmp [call site] 00097
4 memcmp [call site] 00102
4 memcmp [call site] 00107
4 memcmp [call site] 00109
4 check_phys [function] [call site] 00112
4 memcmp [call site] 00113
4 check_time [function] [call site] 00115
4 memcmp [call site] 00116
4 check_offs [function] [call site] 00120
4 memcmp [call site] 00121
4 increase_cache_usage [function] [call site] 00122
4 spng__malloc [function] [call site] 00123
4 read_chunk_bytes2 [function] [call site] 00124
4 spng__free [function] [call site] 00126
4 check_exif [function] [call site] 00127
5 memcmp [call site] 00128
4 spng__free [function] [call site] 00129
4 memcmp [call site] 00130
4 read_chunk_bytes [function] [call site] 00131
4 memchr [call site] 00132
4 check_png_keyword [function] [call site] 00133
5 strlen [call site] 00134
5 strstr [call site] 00135
4 spng__inflate_stream [function] [call site] 00136
5 spng__inflate_init [function] [call site] 00137
6 inflateEnd [function] [call site] 00138
7 inflateStateCheck [function] [call site] 00139
6 spng__zalloc [function] [call site] 00140
7 spng__malloc [function] [call site] 00141
6 spng__zfree [function] [call site] 00142
7 spng__free [function] [call site] 00143
6 inflateInit2_ [function] [call site] 00144
7 inflateReset2 [function] [call site] 00147
8 inflateStateCheck [function] [call site] 00148
8 inflateReset [function] [call site] 00149
9 inflateStateCheck [function] [call site] 00150
9 inflateResetKeep [function] [call site] 00151
10 inflateStateCheck [function] [call site] 00152
6 is_critical_chunk [function] [call site] 00153
6 inflateValidate [function] [call site] 00154
7 inflateStateCheck [function] [call site] 00155
5 spng__malloc [function] [call site] 00156
5 spng__realloc [function] [call site] 00182
5 read_chunk_bytes [function] [call site] 00183
5 spng__realloc [function] [call site] 00184
5 increase_cache_usage [function] [call site] 00185
5 spng__free [function] [call site] 00186
4 memcmp [call site] 00187
4 memcmp [call site] 00188
4 memcmp [call site] 00189
4 increase_cache_usage [function] [call site] 00190
4 spng__realloc [function] [call site] 00191
4 text_undo [function] [call site] 00192
5 spng__free [function] [call site] 00193
5 spng__free [function] [call site] 00194
5 decrease_cache_usage [function] [call site] 00195
5 decrease_cache_usage [function] [call site] 00196
4 read_chunk_bytes [function] [call site] 00197
4 memchr [call site] 00198
4 memcmp [call site] 00199
4 memcmp [call site] 00200
4 memcmp [call site] 00201
4 memchr [call site] 00202
4 memchr [call site] 00203
4 increase_cache_usage [function] [call site] 00204
4 spng__calloc [function] [call site] 00205
4 spng__inflate_stream [function] [call site] 00206
4 increase_cache_usage [function] [call site] 00207
4 spng__malloc [function] [call site] 00208
4 read_chunk_bytes2 [function] [call site] 00209
4 check_png_keyword [function] [call site] 00210
4 strlen [call site] 00211
4 check_png_text [function] [call site] 00212
4 memcmp [call site] 00213
4 increase_cache_usage [function] [call site] 00214
4 spng__realloc [function] [call site] 00215
4 splt_undo [function] [call site] 00216
5 spng__free [function] [call site] 00217
5 decrease_cache_usage [function] [call site] 00218
5 decrease_cache_usage [function] [call site] 00219
4 spng__malloc [function] [call site] 00220
4 read_chunk_bytes2 [function] [call site] 00221
4 memchr [call site] 00222
4 check_png_keyword [function] [call site] 00223
4 strcmp [call site] 00224
4 increase_cache_usage [function] [call site] 00225
4 spng__malloc [function] [call site] 00226
4 spng__free [function] [call site] 00227
4 spng__free [function] [call site] 00234
4 decrease_cache_usage [function] [call site] 00235
4 increase_cache_usage [function] [call site] 00236
4 spng__realloc [function] [call site] 00237
4 chunk_undo [function] [call site] 00238
5 spng__free [function] [call site] 00239
5 decrease_cache_usage [function] [call site] 00240
5 decrease_cache_usage [function] [call site] 00241
4 spng__malloc [function] [call site] 00242
4 read_chunk_bytes2 [function] [call site] 00243
4 spng__free [function] [call site] 00244
4 discard_chunk_bytes [function] [call site] 00245
3 is_critical_chunk [function] [call site] 00246
3 discard_chunk_bytes [function] [call site] 00247
3 decode_err [function] [call site] 00248
3 decode_err [function] [call site] 00249
3 decode_err [function] [call site] 00250
2 check_decode_fmt [function] [call site] 00251
2 calculate_image_size [function] [call site] 00252
3 calculate_image_width [function] [call site] 00253
4 calculate_scanline_width [function] [call site] 00254
1 spng_get_ihdr [function] [call site] 00255
2 read_chunks [function] [call site] 00256
1 spng_get_plte [function] [call site] 00257
2 read_chunks [function] [call site] 00258
1 spng_get_trns [function] [call site] 00259
2 read_chunks [function] [call site] 00260
1 spng_get_chrm [function] [call site] 00261
2 read_chunks [function] [call site] 00262
1 spng_get_chrm_int [function] [call site] 00263
2 read_chunks [function] [call site] 00264
1 spng_get_gama [function] [call site] 00265
2 read_chunks [function] [call site] 00266
1 spng_get_iccp [function] [call site] 00267
2 read_chunks [function] [call site] 00268
1 spng_get_sbit [function] [call site] 00269
2 read_chunks [function] [call site] 00270
1 spng_get_srgb [function] [call site] 00271
2 read_chunks [function] [call site] 00272
1 spng_get_text [function] [call site] 00273
2 read_chunks [function] [call site] 00274
2 strlen [call site] 00275
1 spng_get_text [function] [call site] 00276
1 memchr [call site] 00277
1 spng_ctx_free [function] [call site] 00278
2 spng__free [function] [call site] 00279
2 spng__free [function] [call site] 00280
2 spng__free [function] [call site] 00281
2 spng__free [function] [call site] 00282
2 spng__free [function] [call site] 00283
2 spng__free [function] [call site] 00284
2 spng__free [function] [call site] 00285
2 spng__free [function] [call site] 00286
2 spng__free [function] [call site] 00287
2 spng__free [function] [call site] 00288
2 deflateEnd [function] [call site] 00289
3 deflateStateCheck [function] [call site] 00290
2 inflateEnd [function] [call site] 00291
2 spng__free [function] [call site] 00292
2 spng__free [function] [call site] 00293
2 spng__free [function] [call site] 00294
2 spng__free [function] [call site] 00295
2 spng__free [function] [call site] 00296
2 spng__free [function] [call site] 00297
1 strlen [call site] 00298
1 spng_get_bkgd [function] [call site] 00299
2 read_chunks [function] [call site] 00300
1 spng_get_hist [function] [call site] 00301
2 read_chunks [function] [call site] 00302
1 spng_get_phys [function] [call site] 00303
2 read_chunks [function] [call site] 00304
1 spng_get_splt [function] [call site] 00305
2 read_chunks [function] [call site] 00306
1 spng_get_splt [function] [call site] 00307
1 memchr [call site] 00308
1 spng_ctx_free [function] [call site] 00309
1 spng_get_unknown_chunks [function] [call site] 00310
2 read_chunks [function] [call site] 00311
1 spng_get_unknown_chunks [function] [call site] 00312
1 spng_ctx_free [function] [call site] 00313
1 spng_decode_image [function] [call site] 00314
2 read_chunks [function] [call site] 00315
2 decode_err [function] [call site] 00316
2 check_decode_fmt [function] [call site] 00317
2 calculate_image_width [function] [call site] 00318
2 decode_err [function] [call site] 00319
2 read_idat_bytes [function] [call site] 00320
3 memcmp [call site] 00321
3 read_header [function] [call site] 00322
3 memcmp [call site] 00323
3 read_chunk_bytes [function] [call site] 00324
2 decode_err [function] [call site] 00325
2 spng__inflate_init [function] [call site] 00327
2 decode_err [function] [call site] 00328
2 spng__malloc [function] [call site] 00329
2 spng__malloc [function] [call site] 00330
2 spng__malloc [function] [call site] 00331
2 decode_err [function] [call site] 00332
2 decode_err [function] [call site] 00333
2 spng__malloc [function] [call site] 00334
2 decode_err [function] [call site] 00335
2 decode_err [function] [call site] 00336
2 pow [call site] 00337
2 decode_err [function] [call site] 00338
2 sample_to_target [function] [call site] 00339
3 abs [call site] 00340
2 sample_to_target [function] [call site] 00341
2 sample_to_target [function] [call site] 00342
2 sample_to_target [function] [call site] 00343
2 decode_err [function] [call site] 00344
2 read_scanline_bytes [function] [call site] 00345
3 read_idat_bytes [function] [call site] 00347
2 decode_err [function] [call site] 00348
2 decode_err [function] [call site] 00349
2 spng_decode_row [function] [call site] 00350
3 spng_decode_scanline [function] [call site] 00351
4 spng__iter_init [function] [call site] 00352
4 read_scanline [function] [call site] 00353
5 read_scanline_bytes [function] [call site] 00354
5 read_scanline_bytes [function] [call site] 00355
5 u16_row_to_host [function] [call site] 00356
5 defilter_scanline [function] [call site] 00358
6 defilter_up [function] [call site] 00404
6 paeth [function] [call site] 00405
7 abs [call site] 00406
7 abs [call site] 00407
7 abs [call site] 00408
4 decode_err [function] [call site] 00409
4 unpack_scanline [function] [call site] 00410
5 spng__iter_init [function] [call site] 00411
5 get_sample [function] [call site] 00412
5 get_sample [function] [call site] 00413
5 get_sample [function] [call site] 00414
4 rgb8_row_to_rgba8 [function] [call site] 00415
4 expand_row [function] [call site] 00416
4 get_sample [function] [call site] 00417
4 get_sample [function] [call site] 00418
4 trns_row [function] [call site] 00419
5 memcmp [call site] 00420
5 memcmp [call site] 00421
5 memcmp [call site] 00422
5 spng__iter_init [function] [call site] 00423
5 get_sample [function] [call site] 00424
5 memcmp [call site] 00425
5 spng__iter_init [function] [call site] 00426
5 get_sample [function] [call site] 00427
4 scale_row [function] [call site] 00428
5 sample_to_target [function] [call site] 00429
5 sample_to_target [function] [call site] 00430
5 sample_to_target [function] [call site] 00431
5 sample_to_target [function] [call site] 00432
5 sample_to_target [function] [call site] 00433
5 sample_to_target [function] [call site] 00434
5 sample_to_target [function] [call site] 00435
5 sample_to_target [function] [call site] 00436
5 sample_to_target [function] [call site] 00437
5 sample_to_target [function] [call site] 00438
5 sample_to_target [function] [call site] 00439
5 sample_to_target [function] [call site] 00440
5 sample_to_target [function] [call site] 00441
4 gamma_correct_row [function] [call site] 00442
4 update_row_info [function] [call site] 00443
4 discard_chunk_bytes [function] [call site] 00444
4 decode_err [function] [call site] 00445
3 spng_decode_scanline [function] [call site] 00446
3 spng__iter_init [function] [call site] 00447
3 get_sample [function] [call site] 00448
2 decode_err [function] [call site] 00449
1 spng_get_row_info [function] [call site] 00450
1 spng_decode_row [function] [call site] 00451
1 spng_decode_image [function] [call site] 00452
1 spng_get_time [function] [call site] 00453
2 read_chunks [function] [call site] 00454
1 spng_ctx_free [function] [call site] 00455
1 fclose [call site] 00456