Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Fuzzer details

Fuzzer: hts_open_fuzzer

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 2950 53.5%
gold [1:9] 219 3.97%
yellow [10:29] 103 1.87%
greenyellow [30:49] 76 1.37%
lawngreen 50+ 2160 39.2%
All colors 5508 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
234 4033 hts_str2dbl call site: 04033 bam_sym_lookup
138 1551 hts_hopen call site: 01551 hts_process_opts
109 4726 idx_find_and_load call site: 04726 hts_idx_load3
79 2532 zlib_mem_deflate call site: 02532 fqz_compress
78 3014 ks_free call site: 03014 cram_get_ref
77 3903 sam_parse1 call site: 03903 sam_dispatcher_read
69 1480 refs2id call site: 01480 hts_tpool_init
67 2685 rans_compress_to_4x16 call site: 02685 arith_compress_to
64 4867 idx_find_and_load call site: 04867 hts_idx_load3
62 1789 sam_format1_append call site: 01789 hts_set_opt
51 1052 hwrite call site: 01052 bgzf_close_mt
51 4387 cram_put_bam_seq call site: 04387 sam_dispatcher_write

Runtime coverage analysis

Covered functions
790
Functions that are reachable but not covered
449
Reachable functions
1092
Percentage of reachable functions covered
58.88%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/htslib/test/fuzz/hts_open_fuzzer.c 4
/src/htslib/hfile.c 42
/src/htslib/./textutils_internal.h 12
/src/htslib/hts.c 68
/src/htslib/./htslib/khash.h 1
/src/htslib/hfile_libcurl.c 7
/src/htslib/kstring.c 8
/src/htslib/./htslib/kstring.h 17
/src/htslib/hfile_gcs.c 1
/src/htslib/hfile_s3.c 1
/src/htslib/hfile_s3_write.c 3
/src/htslib/./htslib/hts.h 9
/src/htslib/./hts_internal.h 3
/src/htslib/multipart.c 5
/src/htslib/textutils.c 9
/src/htslib/./htslib/hfile.h 8
/src/htslib/bgzf.c 66
/src/htslib/cram/cram_io.c 75
/src/htslib/cram/../htslib/hfile.h 5
/src/htslib/cram/cram_structs.h 24
/src/htslib/cram/../header.h 4
/src/htslib/cram/string_alloc.c 6
/src/htslib/cram/cram_stats.c 5
/src/htslib/sam.c 86
/src/htslib/./htslib/sam.h 5
/src/htslib/htscodecs/htscodecs/rANS_static.c 6
/src/htslib/htscodecs/htscodecs/utils.c 5
/src/htslib/htscodecs/htscodecs/rANS_byte.h 11
/src/htslib/htscodecs/htscodecs/fqzcomp_qual.c 19
/src/htslib/htscodecs/htscodecs/varint.h 3
/src/htslib/htscodecs/htscodecs/c_simple_model.h 12
/src/htslib/htscodecs/htscodecs/c_range_coder.h 12
/src/htslib/htscodecs/htscodecs/rANS_static4x16pr.c 9
/src/htslib/htscodecs/htscodecs/utils.h 4
/src/htslib/htscodecs/htscodecs/pack.c 3
/usr/local/lib/clang/22/include/cpuid.h 1
/src/htslib/htscodecs/htscodecs/rle.c 3
/src/htslib/htscodecs/htscodecs/arith_dynamic.c 11
/src/htslib/htscodecs/htscodecs/tokenise_name3.c 33
/src/htslib/htscodecs/htscodecs/pooled_alloc.h 4
/src/htslib/header.c 47
/src/htslib/./header.h 13
/src/htslib/cram/pooled_alloc.c 6
/src/htslib/./cram/../htslib/khash.h 1
/src/htslib/cram/mFILE.c 12
/src/htslib/thread_pool.c 29
/src/htslib/./htslib/hts_endian.h 16
/src/htslib/cram/../htslib/khash.h 1
/src/htslib/cram/cram_index.c 6
/src/htslib/cram/cram_decode.c 21
/src/htslib/faidx.c 14
/src/htslib/cram/../textutils_internal.h 3
/src/htslib/./sam_internal.h 3
/src/htslib/./cram/cram_io.h 1
/src/htslib/hts_expr.c 21
/src/htslib/cram/cram_encode.c 40
/src/htslib/cram/open_trace_file.c 6
/src/htslib/md5.c 7
/src/htslib/cram/../htslib/hts_endian.h 4
/src/htslib/cram/cram_io.h 10
/src/htslib/cram/../sam_internal.h 1
/src/htslib/cram/../htslib/kstring.h 7
/src/htslib/cram/cram_codecs.c 4
/src/htslib/cram/../hts_internal.h 1
/src/htslib/./htslib/bgzf.h 2
/src/htslib/./htslib/hts_expr.h 4
/src/htslib/vcf.c 96
/src/htslib/tbx.c 5
/src/htslib/./cram/../htslib/hts_endian.h 2
/src/htslib/./htslib/vcf.h 10

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
sam_itr_regarray /src/htslib/sam.c 4 ['N/A', 'N/A', 'N/A', 'int'] 31 0 119 19 8 677 0 6044 417
s3_vopen /src/htslib/hfile_s3.c 3 ['N/A', 'N/A', 'N/A'] 11 0 44 6 3 150 0 782 355
vhopen_libcurl /src/htslib/hfile_libcurl.c 3 ['N/A', 'N/A', 'N/A'] 14 0 54 9 4 153 0 801 326
bcf_index_build /src/htslib/vcf.c 2 ['N/A', 'int'] 27 0 18 3 2 937 0 9462 315
bam_mplp_auto /src/htslib/sam.c 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 8 0 65 10 4 34 0 328 277
rans_uncompress_O1_32x16_avx2 /src/htslib/htscodecs/htscodecs/rANS_static32x16pr_avx2.c 4 ['N/A', 'int', 'N/A', 'int'] 4 0 4538 103 35 24 0 185 126
bcf_hdr_subset /src/htslib/vcf.c 4 ['N/A', 'int', 'N/A', 'N/A'] 11 0 376 49 18 96 0 766 118
rans_compress_O1_32x16_avx512 /src/htslib/htscodecs/htscodecs/rANS_static32x16pr_avx512.c 4 ['N/A', 'int', 'N/A', 'N/A'] 8 0 1823 92 29 35 0 223 117
sam_hdr_remove_lines /src/htslib/header.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 11 0 352 59 24 88 0 776 114
sam_itr_queryi /src/htslib/sam.c 4 ['N/A', 'int', 'size_t', 'size_t'] 31 0 62 8 4 674 0 6022 89

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
67.0%
1173 / 1744
Cyclomatic complexity statically reachable by fuzzers
77.0%
13315 / 17319

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
bgzf_compress 49 25 51.02% ['hts_open_fuzzer']
bgzf_read_block 205 70 34.14% ['hts_open_fuzzer']
bgzf_flush 37 16 43.24% ['hts_open_fuzzer']
bgzf_check_EOF 34 9 26.47% ['hts_open_fuzzer']
bgzf_write_init 41 15 36.58% ['hts_open_fuzzer']
cram_beta_encode_init 70 36 51.42% ['hts_open_fuzzer']
cram_dependent_data_series 227 20 8.810% ['hts_open_fuzzer']
cram_decode_slice 537 70 13.03% ['hts_open_fuzzer']
cram_next_slice 184 83 45.10% ['hts_open_fuzzer']
cram_get_seq 45 12 26.66% ['hts_open_fuzzer']
cram_drain_rqueue 50 4 8.0% ['hts_open_fuzzer']
cram_decode_slice_xref 115 7 6.086% ['hts_open_fuzzer']
cram_first_slice 42 20 47.61% ['hts_open_fuzzer']
lossy_read_names 57 6 10.52% ['hts_open_fuzzer']
cram_allocate_block 64 34 53.12% ['hts_open_fuzzer']
ltf8_decode_crc 99 43 43.43% ['hts_open_fuzzer']
cram_uncompress_block 148 77 52.02% ['hts_open_fuzzer']
cram_block_method2str 36 14 38.88% ['hts_open_fuzzer']
cram_get_ref 117 24 20.51% ['hts_open_fuzzer']
cram_write_SAM_hdr 181 91 50.27% ['hts_open_fuzzer']
cram_set_voption 207 10 4.830% ['hts_open_fuzzer']
ltf8_put 67 22 32.83% ['hts_open_fuzzer']
cram_compress_by_method 106 35 33.01% ['hts_open_fuzzer']
cram_populate_ref 137 37 27.00% ['hts_open_fuzzer']
refs_load_fai 113 30 26.54% ['hts_open_fuzzer']
tokenise_search_path 59 17 28.81% ['hts_open_fuzzer']
open_path_mfile 48 23 47.91% ['hts_open_fuzzer']
expand_path 51 16 31.37% ['hts_open_fuzzer']
sam_hdr_count_lines 35 12 34.28% ['hts_open_fuzzer']
sam_hrecs_find_type_id 53 13 24.52% ['hts_open_fuzzer']
sam_hrecs_vadd 97 52 53.60% ['hts_open_fuzzer']
hseek 36 16 44.44% ['hts_open_fuzzer']
gcs_rewrite 64 32 50.0% ['hts_open_fuzzer']
add_callback_headers 34 17 50.0% ['hts_open_fuzzer']
get_auth_token 54 8 14.81% ['hts_open_fuzzer']
parse_va_list 62 31 50.0% ['hts_open_fuzzer']
easy_errno 58 13 22.41% ['hts_open_fuzzer']
s3_open_v4 70 21 30.0% ['hts_open_fuzzer']
parse_ini 33 6 18.18% ['hts_open_fuzzer']
hts_open_format 72 36 50.0% ['hts_open_fuzzer']
hts_idx_check_local 110 41 37.27% ['hts_open_fuzzer']
hts_idx_load3 32 7 21.87% ['hts_open_fuzzer']
format_category 34 14 41.17% ['hts_open_fuzzer']
idx_find_and_load 48 10 20.83% ['hts_open_fuzzer']
decode_name 145 48 33.10% ['hts_open_fuzzer']
kh_resize_vdict 62 34 54.83% ['hts_open_fuzzer']
sam_hdr_dup 46 17 36.95% ['hts_open_fuzzer']
sam_hdr_write 90 48 53.33% ['hts_open_fuzzer']
sam_state_destroy 80 5 6.25% ['hts_open_fuzzer']
sam_write1 127 20 15.74% ['hts_open_fuzzer']
sam_read1_sam 83 21 25.30% ['hts_open_fuzzer']
index_load 37 13 35.13% ['hts_open_fuzzer']
bcf_hdr_get_hrec 49 12 24.48% ['hts_open_fuzzer']
bcf_write 45 16 35.55% ['hts_open_fuzzer']
vcf_hdr_read 80 34 42.5% ['hts_open_fuzzer']
bcf_fmt_array1 45 11 24.44% ['hts_open_fuzzer']
get_rlen 196 77 39.28% ['hts_open_fuzzer']

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
/src/htslib/cram/cram_decode.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/rANS_static16_int.h [] []
/src/htslib/hfile.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./cram/../htslib/khash.h ['hts_open_fuzzer'] []
/src/htslib/./htslib/vcf.h ['hts_open_fuzzer'] []
/src/htslib/cram/../htslib/hts_endian.h ['hts_open_fuzzer'] []
/src/htslib/multipart.c ['hts_open_fuzzer'] []
/src/htslib/bgzf.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/hfile_s3_write.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/cram_codecs.h [] []
/src/htslib/./hts_time_funcs.h [] []
/src/htslib/htscodecs/htscodecs/fqzcomp_qual.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./htslib/bgzf.h ['hts_open_fuzzer'] []
/src/htslib/./cram/cram_io.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./textutils_internal.h ['hts_open_fuzzer'] []
/src/htslib/htscodecs/htscodecs/c_range_coder.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/textutils.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/region.c [] []
/src/htslib/htscodecs/htscodecs/rANS_static32x16pr_sse4.c [] []
/src/htslib/hts.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./htslib/khash.h ['hts_open_fuzzer'] []
/src/htslib/simd.c [] []
/src/htslib/cram/string_alloc.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./hts_internal.h ['hts_open_fuzzer'] []
/src/htslib/cram/mFILE.c ['hts_open_fuzzer'] []
/src/htslib/./sam_internal.h ['hts_open_fuzzer'] []
/src/htslib/vcf.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/cram_stats.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./htslib/hts_expr.h ['hts_open_fuzzer'] []
/src/htslib/htscodecs/htscodecs/rANS_static4x16pr.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./htslib/hts.h ['hts_open_fuzzer'] []
/src/htslib/cram/cram_io.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/hfile_libcurl.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/utils.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./htslib/khash_str2int.h [] []
/src/htslib/htscodecs/htscodecs/htscodecs.c [] []
/src/htslib/cram/cram_structs.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/hts_expr.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/md5.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./header.h ['hts_open_fuzzer'] []
/src/htslib/cram/open_trace_file.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/faidx.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/header.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/rANS_static32x16pr_avx2.c [] []
/src/htslib/./htslib/sam.h ['hts_open_fuzzer'] []
/src/htslib/cram/pooled_alloc.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/utils.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/cram_io.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/pooled_alloc.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/rANS_word.h [] []
/src/htslib/./htslib/hfile.h ['hts_open_fuzzer'] []
/src/htslib/kstring.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/hfile_s3.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/../htslib/kstring.h ['hts_open_fuzzer'] []
/src/htslib/htscodecs/htscodecs/pack.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/../header.h ['hts_open_fuzzer'] []
/src/htslib/thread_pool.c ['hts_open_fuzzer'] []
/src/htslib/htscodecs/htscodecs/tokenise_name3.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/./htslib/kstring.h ['hts_open_fuzzer'] []
/src/htslib/hfile_gcs.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/sam_mods.c [] []
/src/htslib/htscodecs/htscodecs/rle.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/rANS_byte.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/cram_encode.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/rANS_static.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/rANS_static32x16pr_avx512.c [] []
/src/htslib/htscodecs/htscodecs/rANS_static32x16pr.c [] []
/src/htslib/./htslib/hts_endian.h ['hts_open_fuzzer'] []
/src/htslib/cram/../textutils_internal.h ['hts_open_fuzzer'] []
/src/htslib/cram/../htslib/hfile.h ['hts_open_fuzzer'] []
/usr/local/lib/clang/22/include/cpuid.h ['hts_open_fuzzer'] []
/src/htslib/htscodecs/htscodecs/varint.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/cram_codecs.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/test/fuzz/hts_open_fuzzer.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/../sam_internal.h ['hts_open_fuzzer'] []
/src/htslib/cram/cram_index.c ['hts_open_fuzzer'] []
/src/htslib/htscodecs/htscodecs/c_simple_model.h ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/sam.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/htscodecs/htscodecs/arith_dynamic.c ['hts_open_fuzzer'] ['hts_open_fuzzer']
/src/htslib/cram/../htscodecs/htscodecs/varint.h [] ['hts_open_fuzzer']
/src/htslib/tbx.c ['hts_open_fuzzer'] ['hts_open_fuzzer']

Directories in report

Directory
/src/htslib/cram/../
/src/htslib/
/src/htslib/./htslib/
/src/htslib/./cram/
/src/htslib/cram/../htslib/
/src/htslib/cram/../htscodecs/htscodecs/
/src/htslib/./
/src/htslib/test/fuzz/
/src/htslib/./cram/../htslib/
/src/htslib/cram/
/src/htslib/htscodecs/htscodecs/
/usr/local/lib/clang/22/include/