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: fuzz_astc_physical_to_symbolic

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 0 0.0%
gold [1:9] 16 17.7%
yellow [10:29] 2 2.22%
greenyellow [30:49] 5 5.55%
lawngreen 50+ 67 74.4%
All colors 90 100

Runtime coverage analysis

Covered functions
37
Functions that are reachable but not covered
4
Reachable functions
75
Percentage of reachable functions covered
94.67%
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/astc-encoder/Source/./Fuzzers/fuzz_astc_physical_to_symbolic.cpp 2
/src/astc-encoder/Source/./astcenc_block_sizes.cpp 9
/src/astc-encoder/Source/./astcenc_mathlib.h 2
/src/astc-encoder/Source/./astcenc_integer_sequence.cpp 3
/src/astc-encoder/Source/./astcenc_mathlib.cpp 3
/src/astc-encoder/Source/./astcenc_percentile_tables.cpp 2
/src/astc-encoder/Source/./astcenc_internal.h 5
/src/astc-encoder/Source/./astcenc_partition_tables.cpp 7
/src/astc-encoder/Source/./astcenc_symbolic_physical.cpp 3

Fuzzer: fuzz_astc_decompress

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 36 13.1%
gold [1:9] 0 0.0%
yellow [10:29] 1 0.36%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 236 86.4%
All colors 273 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
12 258 store_image_block(astcenc_image&, image_block const&, block_size_descriptor const&, unsigned int, unsigned int, unsigned int, astcenc_swizzle const&) call site: 00258 __assert_fail
11 63 astcenc_context_alloc call site: 00063 __assert_fail
6 142 physical_to_symbolic(block_size_descriptor const&, unsigned char const*, symbolic_compressed_block&) call site: 00142
2 114 astcenc_context_alloc call site: 00114
1 5 validate_block_size(unsigned int, unsigned int, unsigned int) call site: 00005
1 27 astcenc_context_alloc call site: 00027
1 29 ParallelManager::ParallelManager() call site: 00029
1 56 validate_config(astcenc_config&) call site: 00056
1 61 block_size_descriptor* aligned_malloc (unsigned long, unsigned long) call site: 00061

Runtime coverage analysis

Covered functions
201
Functions that are reachable but not covered
35
Reachable functions
225
Percentage of reachable functions covered
84.44%
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/astc-encoder/Source/./Fuzzers/fuzz_astc_decompress.cpp 1
/src/astc-encoder/Source/./astcenc_entry.cpp 12
/src/astc-encoder/Source/./astcenc_mathlib.h 16
/src/astc-encoder/Source/./astcenc_percentile_tables.cpp 4
/src/astc-encoder/Source/./astcenc_vecmathlib_common_4.h 1
/src/astc-encoder/Source/./astcenc_internal_entry.h 8
/src/astc-encoder/Source/./astcenc_internal.h 13
/src/astc-encoder/Source/./astcenc_block_sizes.cpp 9
/src/astc-encoder/Source/./astcenc_integer_sequence.cpp 3
/src/astc-encoder/Source/./astcenc_mathlib.cpp 3
/src/astc-encoder/Source/./astcenc_partition_tables.cpp 7
/src/astc-encoder/Source/./astcenc_weight_align.cpp 1
/src/astc-encoder/Source/./astcenc_symbolic_physical.cpp 3
/src/astc-encoder/Source/./astcenc_decompress_symbolic.cpp 5
/src/astc-encoder/Source/./astcenc_mathlib_softfloat.cpp 8
/src/astc-encoder/Source/./astcenc_color_unquantize.cpp 18
/src/astc-encoder/Source/./astcenc_image.cpp 1

Fuzzer: fuzz_astc_compress

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 50 5.70%
gold [1:9] 2 0.22%
yellow [10:29] 3 0.34%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 821 93.7%
All colors 876 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
11 63 astcenc_context_alloc call site: 00063 __assert_fail
11 136 ParallelManager::get_task_assignment(unsigned int, unsigned int&) call site: 00136
11 150 sf16_to_float(unsigned short) call site: 00150 __assert_fail
3 132 astcenc_compress_reset call site: 00132
3 176 float_to_sf16(float) call site: 00176
2 114 astcenc_context_alloc call site: 00114
2 166 compress_image(astcenc_context&, unsigned int, astcenc_image const&, astcenc_swizzle const&, unsigned char*) call site: 00166
2 559 unpack_color_endpoints(astcenc_profile, int, unsigned char const*, bool&, bool&, vint4&, vint4&) call site: 00559
1 5 validate_block_size(unsigned int, unsigned int, unsigned int) call site: 00005
1 27 astcenc_context_alloc call site: 00027
1 29 ParallelManager::ParallelManager() call site: 00029
1 56 validate_config(astcenc_config&) call site: 00056

Runtime coverage analysis

Covered functions
386
Functions that are reachable but not covered
36
Reachable functions
442
Percentage of reachable functions covered
91.86%
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/astc-encoder/Source/./Fuzzers/fuzz_astc_compress.cpp 1
/src/astc-encoder/Source/./astcenc_entry.cpp 14
/src/astc-encoder/Source/./astcenc_mathlib.h 23
/src/astc-encoder/Source/./astcenc_percentile_tables.cpp 4
/src/astc-encoder/Source/./astcenc_vecmathlib_common_4.h 1
/src/astc-encoder/Source/./astcenc_internal_entry.h 11
/src/astc-encoder/Source/./astcenc_internal.h 24
/src/astc-encoder/Source/./astcenc_block_sizes.cpp 9
/src/astc-encoder/Source/./astcenc_integer_sequence.cpp 3
/src/astc-encoder/Source/./astcenc_mathlib.cpp 3
/src/astc-encoder/Source/./astcenc_partition_tables.cpp 7
/src/astc-encoder/Source/./astcenc_weight_align.cpp 6
/src/astc-encoder/Source/./astcenc_compute_variance.cpp 2
/src/astc-encoder/Source/./astcenc_mathlib_softfloat.cpp 8
/src/astc-encoder/Source/./astcenc_compress_symbolic.cpp 7
/src/astc-encoder/Source/./astcenc_symbolic_physical.cpp 3
/src/astc-encoder/Source/./astcenc_ideal_endpoints_and_weights.cpp 15
/src/astc-encoder/Source/./astcenc_averages_and_directions.cpp 8
/src/astc-encoder/Source/./astcenc_pick_best_endpoint_format.cpp 11
/src/astc-encoder/Source/./astcenc_color_quantize.cpp 29
/src/astc-encoder/Source/./astcenc_color_unquantize.cpp 18
/src/astc-encoder/Source/./astcenc_decompress_symbolic.cpp 3
/src/astc-encoder/Source/./astcenc_find_best_partitioning.cpp 11

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
astcenc_get_block_info /src/astc-encoder/Source/./astcenc_entry.cpp 3 ['N/A', 'N/A', 'N/A'] 4 0 4502 133 44 83 0 298 44
compute_symbolic_block_difference_1plane_1partition(astcenc_configconst&,block_size_descriptorconst&,symbolic_compressed_blockconst&,image_blockconst&) /src/astc-encoder/Source/./astcenc_decompress_symbolic.cpp 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 5966 126 40 59 0 195 40
load_image_block(astcenc_profile,astcenc_imageconst&,image_block&,block_size_descriptorconst&,unsignedint,unsignedint,unsignedint,astcenc_swizzleconst&) /src/astc-encoder/Source/./astcenc_image.cpp 8 ['int', 'N/A', 'N/A', 'N/A', 'int', 'int', 'int', 'N/A'] 3 0 3361 115 39 12 0 54 39

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

Functions statically reachable by fuzzers
93.0%
237 / 255
Cyclomatic complexity statically reachable by fuzzers
96.0%
2636 / 2739

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

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

/src/astc-encoder/Source/./Fuzzers/fuzz_astc_physical_to_symbolic.cpp

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


/src/astc-encoder/Source/./Fuzzers/fuzz_astc_decompress.cpp

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['store_image_block(astcenc_image&, image_block const&, block_size_descriptor const&, unsigned int, unsigned int, unsigned int, astcenc_swizzle const&)', 'astcenc_context_alloc', 'physical_to_symbolic(block_size_descriptor const&, unsigned char const*, symbolic_compressed_block&)', 'validate_block_size(unsigned int, unsigned int, unsigned int)', 'ParallelManager::ParallelManager()', 'validate_config(astcenc_config&)', 'block_size_descriptor* aligned_malloc(unsigned long, unsigned long)']

/src/astc-encoder/Source/./Fuzzers/fuzz_astc_compress.cpp

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['astcenc_context_alloc', 'ParallelManager::get_task_assignment(unsigned int, unsigned int&)', 'sf16_to_float(unsigned short)', 'astcenc_compress_reset', 'float_to_sf16(float)', 'compress_image(astcenc_context&, unsigned int, astcenc_image const&, astcenc_swizzle const&, unsigned char*)', 'unpack_color_endpoints(astcenc_profile, int, unsigned char const*, bool&, bool&, vint4&, vint4&)', 'validate_block_size(unsigned int, unsigned int, unsigned int)']

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/astc-encoder/Source/./astcenc_compute_variance.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_entry.cpp ['fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_block_sizes.cpp ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_mathlib.cpp ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_image.cpp ['fuzz_astc_decompress'] []
/src/astc-encoder/Source/./astcenc_internal_entry.h ['fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_averages_and_directions.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./Fuzzers/fuzz_astc_decompress.cpp ['fuzz_astc_decompress'] []
/src/astc-encoder/Source/./astcenc_vecmathlib_common_4.h ['fuzz_astc_decompress', 'fuzz_astc_compress'] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/astc-encoder/Source/./astcenc_internal.h ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_color_quantize.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_symbolic_physical.cpp ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_partition_tables.cpp ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_pick_best_endpoint_format.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_mathlib.h ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_color_unquantize.cpp ['fuzz_astc_decompress', 'fuzz_astc_compress'] []
/usr/local/bin/../include/c++/v1/__exception/exception.h [] []
/src/astc-encoder/Source/./Fuzzers/fuzz_astc_physical_to_symbolic.cpp ['fuzz_astc_physical_to_symbolic'] []
/src/astc-encoder/Source/./astcenc_ideal_endpoints_and_weights.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./Fuzzers/fuzz_astc_compress.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_percentile_tables.cpp ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_weight_align.cpp ['fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_compress_symbolic.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_decompress_symbolic.cpp ['fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_find_best_partitioning.cpp ['fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_mathlib_softfloat.cpp ['fuzz_astc_decompress', 'fuzz_astc_compress'] []
/src/astc-encoder/Source/./astcenc_integer_sequence.cpp ['fuzz_astc_physical_to_symbolic', 'fuzz_astc_decompress', 'fuzz_astc_compress'] []

Directories in report

Directory
/src/astc-encoder/Source/./Fuzzers/
/usr/local/bin/../include/c++/v1/
/usr/local/bin/../include/c++/v1/__exception/
/src/astc-encoder/Source/./