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

Fuzzer details

Fuzzer: croaring_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 24 27.9%
gold [1:9] 2 2.32%
yellow [10:29] 2 2.32%
greenyellow [30:49] 3 3.48%
lawngreen 50+ 55 63.9%
All colors 86 100

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
2 2 1 :

['roaring_realloc']

4 6 run_container_grow call site /src/croaring/src/containers/run.c:193
0 2 1 :

['roaring_free']

0 2 array_container_create_given_capacity call site /src/croaring/src/containers/array.c:41
0 2 1 :

['roaring_free']

0 2 bitset_container_create call site /src/croaring/src/containers/bitset.c:59
0 0 None 16 363 ra_portable_deserialize call site /src/croaring/src/roaring_array.c:757
0 0 None 2 35 ra_portable_deserialize call site /src/croaring/src/roaring_array.c:802
0 0 None 2 35 ra_portable_deserialize call site /src/croaring/src/roaring_array.c:831
0 0 None 2 35 ra_portable_deserialize call site /src/croaring/src/roaring_array.c:852
0 0 None 2 4 run_container_grow call site /src/croaring/src/containers/run.c:200
0 0 None 0 0 roaring_bitmap_set_copy_on_write call site /src/croaring/include/roaring/roaring.h:81
0 0 None 0 0 array_container_create_given_capacity call site /src/croaring/src/containers/array.c:39

Runtime coverage analysis

Covered functions
34
Functions that are reachable but not covered
6
Reachable functions
37
Percentage of reachable functions covered
83.78%
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/croaring_fuzzer.c 1
src/roaring.c 3
src/memory.c 5
src/roaring_array.c 6
src/containers/containers.c 2
src/containers/bitset.c 4
src/containers/array.c 5
src/containers/run.c 5
include/roaring/containers/run.h 2
include/roaring/containers/array.h 1
include/roaring/roaring.h 1

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
roaring_bitmap_xor_many /src/croaring/src/roaring.c 2 ['size_t ', 'struct.roaring_bitmap_s **'] 6 0 64 14 6 125 0 542 446
roaring_bitmap_add_offset /src/croaring/src/roaring.c 2 ['struct.roaring_bitmap_s *', 'size_t '] 6 0 228 39 16 115 0 532 275
roaring_bitmap_andnot_inplace /src/croaring/src/roaring.c 2 ['struct.roaring_bitmap_s *', 'struct.roaring_bitmap_s *'] 8 0 245 37 14 104 0 473 240
roaring_bitmap_and_inplace /src/croaring/src/roaring.c 2 ['struct.roaring_bitmap_s *', 'struct.roaring_bitmap_s *'] 5 0 212 32 12 89 0 451 209
roaring_bitmap_flip_inplace /src/croaring/src/roaring.c 3 ['struct.roaring_bitmap_s *', 'size_t ', 'size_t '] 7 0 133 25 10 76 0 338 123
roaring_bitmap_xor_cardinality /src/croaring/src/roaring.c 2 ['struct.roaring_bitmap_s *', 'struct.roaring_bitmap_s *'] 5 0 22 3 2 35 0 191 111
roaring_bitmap_serialize /src/croaring/src/roaring.c 2 ['struct.roaring_bitmap_s *', 'char *'] 7 0 45 6 3 37 0 161 106
roaring_bitmap_or_many /src/croaring/src/roaring.c 2 ['size_t ', 'struct.roaring_bitmap_s **'] 5 0 64 14 6 118 0 519 103
roaring_bitmap_is_strict_subset /src/croaring/src/roaring.c 2 ['struct.roaring_bitmap_s *', 'struct.roaring_bitmap_s *'] 7 0 28 6 3 34 0 184 100
roaring_bitmap_equals /src/croaring/src/roaring.c 2 ['struct.roaring_bitmap_s *', 'struct.roaring_bitmap_s *'] 6 0 110 20 9 29 0 143 93

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

Functions statically reachable by fuzzers
59.21%
344/581
Cyclomatic complexity statically reachable by fuzzers
60.65%
1956 / 3225

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 Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

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/croaring/src/containers/convert.c [] []
/src/croaring/src/containers/mixed_intersection.c [] []
/src/croaring/src/roaring.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/containers/mixed_subset.c [] []
/src/croaring/src/containers/containers.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/include/roaring/bitset_util.h [] []
/src/croaring/src/bitset_util.c [] []
/src/croaring/src/containers/mixed_xor.c [] []
/src/croaring/include/roaring/containers/array.h ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/include/roaring/roaring.h ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/include/roaring/isadetection.h [] []
/src/croaring/include/roaring/containers/containers.h [] []
/src/croaring/include/roaring/portability.h [] []
/src/croaring/src/containers/run.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/containers/array.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/containers/mixed_andnot.c [] []
/src/croaring/include/roaring/containers/run.h ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/containers/mixed_equal.c [] []
/src/croaring_fuzzer.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/memory.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/array_util.c [] []
/src/croaring/include/roaring/containers/bitset.h [] []
/src/croaring/src/containers/mixed_negation.c [] []
/src/croaring/src/containers/mixed_union.c [] []
/src/croaring/include/roaring/roaring_array.h [] []
/src/croaring/include/roaring/array_util.h [] []
/src/croaring/src/roaring_array.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/containers/bitset.c ['croaring_fuzzer'] ['croaring_fuzzer']

Directories in report

Directory
/src/croaring/include/roaring/containers/
/src/croaring/include/roaring/
/src/croaring/src/
/src/
/src/croaring/src/containers/