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: guetzli_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 118 16.5%
gold [1:9] 14 1.96%
yellow [10:29] 17 2.38%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 564 79.1%
All colors 713 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
523 523 2 :

['guetzli::OutputImage::Downsample(guetzli::OutputImage::DownsampleConfig const&)', 'guetzli::OutputImage::DownsampleConfig::DownsampleConfig()']

523 523 guetzli::(anonymousnamespace)::Processor::DownsampleImage(guetzli::OutputImage*) call site: 00000 /src/guetzli/guetzli/processor.cc:98
0 0 None 8 4171 guetzli::(anonymousnamespace)::Processor::ProcessJpegData(guetzli::Paramsconst&,guetzli::JPEGDataconst&,guetzli::Comparator*,guetzli::GuetzliOutput*,guetzli::ProcessStats*) call site: 00000 /src/guetzli/guetzli/processor.cc:861
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1498
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1505
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1514
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1521
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1498
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1505
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1514
0 0 None 4 352 voidbutteraugli::MaltaDiffMapImpl (butteraugli::Image const&,butteraugli::Image const&,unsignedlong,unsignedlong,double,double,double,double,double,butteraugli::Image *) call site: 00000 /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc:1521
0 0 None 2 2 guetzli::PrintDebug(guetzli::ProcessStats*,std::__1::basic_string ,std::__1::allocator >) call site: 00000 /src/guetzli/guetzli/debug_print.cc:22
0 0 None 2 2 guetzli::(anonymousnamespace)::ProcessSOF(unsignedcharconst*,unsignedlong,guetzli::JpegReadMode,unsignedlong*,guetzli::JPEGData*) call site: 00000 /src/guetzli/guetzli/jpeg_data_reader.cc:151

Runtime coverage analysis

Covered functions
238
Functions that are reachable but not covered
123
Reachable functions
480
Percentage of reachable functions covered
74.38%
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/guetzli/fuzz_target.cc 1
/src/guetzli/./guetzli/jpeg_data.h 9
/src/guetzli/guetzli/jpeg_data_reader.cc 27
/src/guetzli/guetzli/jpeg_huffman_decode.cc 2
/src/guetzli/./guetzli/jpeg_huffman_decode.h 1
/src/guetzli/./guetzli/processor.h 3
/src/guetzli/guetzli/processor.cc 28
/usr/local/bin/../include/c++/v1/stdlib.h 1
/src/guetzli/guetzli/jpeg_data_decoder.cc 2
/src/guetzli/guetzli/jpeg_data.cc 3
/src/guetzli/guetzli/output_image.cc 19
/src/guetzli/./guetzli/output_image.h 15
/src/guetzli/guetzli/idct.cc 2
/src/guetzli/./guetzli/color_transform.h 1
/src/guetzli/./guetzli/stats.h 2
/src/guetzli/guetzli/butteraugli_comparator.cc 2
/src/guetzli/./guetzli/comparator.h 2
/src/guetzli/guetzli/gamma_correct.cc 2
/src/guetzli/third_party/butteraugli/butteraugli/butteraugli.h 23
/src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc 16
/src/guetzli/./guetzli/jpeg_data_writer.h 8
/src/guetzli/guetzli/jpeg_data_writer.cc 18
/src/guetzli/./guetzli/fast_log.h 2
/src/guetzli/guetzli/entropy_encode.cc 3
/src/guetzli/./guetzli/entropy_encode.h 1
/src/guetzli/./guetzli/jpeg_bit_writer.h 6
/src/guetzli/guetzli/debug_print.cc 1
/src/guetzli/guetzli/preprocess_downsample.cc 26
/src/guetzli/guetzli/dct_double.cc 5
/src/guetzli/guetzli/quantize.cc 1
/src/guetzli/./guetzli/quantize.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
butteraugli::ButteraugliInterface(std::__1::vector ,std::__1::allocator >>const&,std::__1::vector ,std::__1::allocator >>const&,butteraugli::Image &,double&) /src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc 4 ['N/A', 'N/A', 'N/A', 'N/A'] 13 0 123 24 12 153 0 736 513
guetzli::ButteraugliComparator::CompareBlock(guetzli::OutputImageconst&,int,int)const /src/guetzli/guetzli/butteraugli_comparator.cc 4 ['N/A', 'N/A', 'int', 'int'] 11 0 260 30 26 96 0 258 96
guetzli::Process(guetzli::Paramsconst&,guetzli::ProcessStats*,std::__1::vector >const&,int,int,std::__1::basic_string ,std::__1::allocator >*) /src/guetzli/guetzli/processor.cc 6 ['N/A', 'N/A', 'N/A', 'int', 'int', 'N/A'] 13 0 132 25 25 421 0 1998 61

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

Functions statically reachable by fuzzers
86.0%
290 / 336
Cyclomatic complexity statically reachable by fuzzers
94.0%
2944 / 3132

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/guetzli/fuzz_target.cc

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=['guetzli::(anonymous namespace)::Processor::DownsampleImage(guetzli::OutputImage*)', 'guetzli::OutputImageComponent::GetCoeffBlock(int, int, short*) const', 'guetzli::(anonymous namespace)::EncodeMetadata(guetzli::JPEGData const&, bool, guetzli::JPEGOutput)', 'guetzli::(anonymous namespace)::Processor::ProcessJpegData(guetzli::Params const&, guetzli::JPEGData const&, guetzli::Comparator*, guetzli::GuetzliOutput*, guetzli::ProcessStats*)', 'guetzli::OutputImageComponent::SetCoeffBlock(int, int, short const*)', 'guetzli::(anonymous namespace)::LinearRgb(unsigned long, unsigned long, std::__1::vector > const&)', 'butteraugli::Convolution(butteraugli::Image const&, std::__1::vector > const&, float)', 'guetzli::(anonymous namespace)::ProcessSOF(unsigned char const*, unsigned long, guetzli::JpegReadMode, unsigned long*, guetzli::JPEGData*)', 'guetzli::BuildJpegHuffmanTable(int const*, int const*, guetzli::HuffmanTableEntry*)', 'guetzli::(anonymous namespace)::ProcessScan(unsigned char const*, unsigned long, std::__1::vector > const&, std::__1::vector > const&, unsigned short (*) [64], bool, unsigned long*, guetzli::JPEGData*)']

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/guetzli/guetzli/jpeg_data.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/./guetzli/quantize.h ['guetzli_fuzzer'] []
/src/guetzli/guetzli/processor.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/usr/local/bin/../include/c++/v1/string [] []
/src/guetzli/./guetzli/color_transform.h ['guetzli_fuzzer'] []
/src/guetzli/guetzli/idct.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/output_image.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/entropy_encode.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/preprocess_downsample.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/./guetzli/jpeg_data.h ['guetzli_fuzzer'] []
/src/guetzli/guetzli/butteraugli_comparator.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/jpeg_data_writer.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/./guetzli/comparator.h ['guetzli_fuzzer'] []
/src/guetzli/./guetzli/fast_log.h ['guetzli_fuzzer'] []
/src/guetzli/third_party/butteraugli/butteraugli/butteraugli.h ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/jpeg_huffman_decode.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/./guetzli/butteraugli_comparator.h [] []
/src/guetzli/guetzli/jpeg_data_decoder.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/gamma_correct.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/jpeg_data_reader.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/debug_print.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/./guetzli/processor.h ['guetzli_fuzzer'] []
/src/guetzli/./guetzli/jpeg_data_writer.h ['guetzli_fuzzer'] []
/src/guetzli/fuzz_target.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/guetzli/score.cc [] []
/src/guetzli/guetzli/quantize.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']
/src/guetzli/./guetzli/jpeg_huffman_decode.h ['guetzli_fuzzer'] []
/src/guetzli/./guetzli/stats.h ['guetzli_fuzzer'] []
/usr/local/bin/../include/c++/v1/stdlib.h ['guetzli_fuzzer'] []
/src/guetzli/guetzli/dct_double.cc ['guetzli_fuzzer'] []
/src/guetzli/./guetzli/output_image.h ['guetzli_fuzzer'] []
/src/guetzli/guetzli/fdct.cc [] []
/src/guetzli/./guetzli/jpeg_bit_writer.h ['guetzli_fuzzer'] []
/src/guetzli/guetzli/jpeg_data_encoder.cc [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/guetzli/./guetzli/entropy_encode.h ['guetzli_fuzzer'] []
/src/guetzli/third_party/butteraugli/butteraugli/butteraugli.cc ['guetzli_fuzzer'] ['guetzli_fuzzer']

Directories in report

Directory
/src/guetzli/guetzli/
/usr/local/bin/../include/c++/v1/
/src/guetzli/./guetzli/
/src/guetzli/third_party/butteraugli/butteraugli/
/src/guetzli/