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

Fuzzer details

Fuzzer: fuzzer-encoder

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 165 26.0%
gold [1:9] 7 1.10%
yellow [10:29] 10 1.57%
greenyellow [30:49] 10 1.57%
lawngreen 50+ 442 69.7%
All colors 634 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
604 604 1 :

['ABR_iteration_loop']

712 2415 lame_encode_mp3_frame call site: 00000 /src/lame/libmp3lame/encoder.c:519
375 375 5 :

['hip_set_errorf', 'hip_decode_exit', 'hip_set_msgf', 'hip_decode_init', 'hip_set_debugf']

375 375 lame_init_params call site: 00557 /src/lame/libmp3lame/lame.c:1301
9 9 1 :

['get_klemm_noise']

9 9 quant_compare call site: 00000 /src/lame/libmp3lame/quantize.c:600
4 4 1 :

['lame_msgf']

4 16 lame_init_params_ppflt call site: 00278 /src/lame/libmp3lame/lame.c:145
4 4 2 :

['puts', 'abort']

4 4 EncoderCore ::Run(unsignedchar*,unsignedlong,bool) call site: 00000 /src/LAME-fuzzers/fuzzer-encoder.cpp:637
4 4 2 :

['puts', 'abort']

4 4 EncoderCore ::Run(unsignedchar*,unsignedlong,bool) call site: 00000 /src/LAME-fuzzers/fuzzer-encoder.cpp:637
4 4 2 :

['puts', 'abort']

4 4 EncoderCore ::Run(unsignedchar*,unsignedlong,bool) call site: 00000 /src/LAME-fuzzers/fuzzer-encoder.cpp:637
4 4 2 :

['puts', 'abort']

4 4 EncoderCore ::Run(unsignedchar*,unsignedlong,bool) call site: 00000 /src/LAME-fuzzers/fuzzer-encoder.cpp:637
4 4 2 :

['puts', 'abort']

4 4 EncoderCore ::Run(unsignedchar*,unsignedlong,bool) call site: 00000 /src/LAME-fuzzers/fuzzer-encoder.cpp:637
0 32 1 :

['best_huffman_divide']

0 32 noquant_count_bits call site: 00000 /src/lame/libmp3lame/takehiro.c:747
0 6 1 :

['lame_set_quant_comp']

393 969 lame_init_params call site: 00380 /src/lame/libmp3lame/lame.c:1164
0 6 1 :

['lame_set_quant_comp_short']

393 957 lame_init_params call site: 00383 /src/lame/libmp3lame/lame.c:1166

Runtime coverage analysis

Covered functions
415
Functions that are reachable but not covered
162
Reachable functions
402
Percentage of reachable functions covered
59.7%
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.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/LAME-fuzzers/fuzzer-encoder.cpp 29
/src/LAME-fuzzers/fuzzing-headers/include/fuzzing/datasource/datasource.hpp 8
/src/lame/libmp3lame/lame.c 14
/src/lame/libmp3lame/util.c 20
/src/lame/libmp3lame/mpglib_interface.c 5
/src/mpg123/src/libmpg123/libmpg123.c 9
/src/mpg123/src/libmpg123/format.c 3
/src/mpg123/src/libmpg123/frame.c 14
/src/mpg123/src/libmpg123/readers.c 8
/src/mpg123/src/libmpg123/icy.c 3
/src/mpg123/src/libmpg123/id3.c 8
/src/mpg123/src/libmpg123/stringbuf.c 2
/src/mpg123/src/libmpg123/index.c 6
/src/lame/libmp3lame/set_get.c 41
/src/lame/libmp3lame/id3tag.c 54
/src/lame/libmp3lame/version.c 3
/usr/include/stdlib.h 1
/src/lame/libmp3lame/bitstream.c 5
/src/lame/libmp3lame/presets.c 6
/src/lame/libmp3lame/VbrTag.c 2
/src/lame/libmp3lame/quantize_pvt.c 3
/src/lame/libmp3lame/takehiro.c 4
/src/lame/libmp3lame/quantize.c 2
/src/lame/libmp3lame/vector/xmm_quantize_sub.c 1
/src/lame/libmp3lame/psymodel.c 6
/src/lame/libmp3lame/fft.c 2
/src/lame/libmp3lame/gain_analysis.c 2
/src/mpg123/./src/libmpg123/getcpuflags.h 1
/src/mpg123/src/libmpg123/optimize.c 4
/src/mpg123/src/compat/compat_str.c 1
/src/mpg123/src/libmpg123/layer3.c 1
/src/mpg123/./src/libmpg123/dither_impl.h 3

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
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['class.EncoderCore.204 *', 'char *', 'size_t ', 'N/A'] 19 0 73 14 6 363 0 3368 3122
INT123_do_layer3 /src/mpg123/src/libmpg123/layer3.c 1 ['struct.mpg123_handle_struct.742 *'] 2 0 754 132 48 12 0 322 312
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['class.EncoderCore.212 *', 'char *', 'size_t ', 'N/A'] 19 0 73 14 6 360 0 3353 112
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['class.EncoderCore.196 *', 'char *', 'size_t ', 'N/A'] 19 0 73 14 6 360 0 3349 108
mpg123_open_fixed /src/mpg123/src/libmpg123/libmpg123.c 4 ['struct.mpg123_handle_struct.604 *', 'char *', 'int ', 'int '] 6 0 47 9 4 150 0 1309 108
id3tag_set_fieldvalue_ucs2 /src/lame/libmp3lame/id3tag.c 2 ['struct.lame_global_struct *', 'N/A'] 7 0 27 6 3 47 0 266 105
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['class.EncoderCore.188 *', 'char *', 'size_t ', 'N/A'] 19 0 73 14 6 358 0 3340 99
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['class.EncoderCore.180 *', 'char *', 'size_t ', 'N/A'] 19 0 73 14 6 357 0 3338 97
lame_mp3_tags_fid /src/lame/libmp3lame/lame.c 2 ['struct.lame_global_struct *', 'struct._IO_FILE *'] 3 0 74 16 8 22 0 118 78
INT123_do_layer2 /src/mpg123/src/libmpg123/layer2.c 1 ['struct.mpg123_handle_struct.715 *'] 2 0 203 33 13 6 0 69 61

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

Functions statically reachable by fuzzers
56.0%
669/1194
Cyclomatic complexity statically reachable by fuzzers
69.9%
5990 / 8569

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/mpg123/./src/libmpg123/getcpuflags.h ['fuzzer-encoder'] []
/src/mpg123/./src/libmpg123/synth.h [] []
/src/mpg123/src/libmpg123/icy.c ['fuzzer-encoder'] []
/src/mpg123/./src/libmpg123/sample.h [] []
/src/mpg123/src/libmpg123/libmpg123.c ['fuzzer-encoder'] []
/src/mpg123/src/libmpg123/ntom.c [] []
/src/lame/libmp3lame/reservoir.c [] []
/src/mpg123/src/libmpg123/tabinit.c [] []
/src/mpg123/src/libmpg123/layer3.c ['fuzzer-encoder'] []
/src/lame/libmp3lame/bitstream.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/mpg123/./src/libmpg123/mpg123lib_intern.h [] []
/src/mpg123/src/libmpg123/synth.c [] []
/src/mpg123/src/libmpg123/parse.c [] []
/src/mpg123/./src/libmpg123/swap_bytes_impl.h [] []
/src/lame/libmp3lame/tables.c [] []
/src/lame/libmp3lame/encoder.c [] []
/src/mpg123/./src/libmpg123/synth_8bit.h [] []
/usr/local/bin/../include/c++/v1/math.h [] []
/src/LAME-fuzzers/fuzzing-headers/include/fuzzing/types.hpp [] []
/usr/include/stdlib.h ['fuzzer-encoder'] []
/src/lame/libmp3lame/set_get.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/mpg123/src/libmpg123/icy2utf8.c [] []
/src/lame/libmp3lame/fft.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/mpg123/src/libmpg123/stringbuf.c ['fuzzer-encoder'] []
/usr/local/bin/../include/c++/v1/iosfwd [] []
/src/lame/libmp3lame/newmdct.c [] []
/src/lame/libmp3lame/VbrTag.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/lame/libmp3lame/quantize_pvt.c ['fuzzer-encoder'] ['fuzzer-encoder']
/usr/include/x86_64-linux-gnu/sys/stat.h [] []
/src/mpg123/src/compat/compat.c [] []
/src/LAME-fuzzers/fuzzing-headers/include/fuzzing/exception.hpp [] []
/usr/local/bin/../include/c++/v1/exception [] []
/src/mpg123/src/libmpg123/optimize.c ['fuzzer-encoder'] []
/src/lame/libmp3lame/id3tag.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/mpg123/src/libmpg123/index.c ['fuzzer-encoder'] []
/src/lame/libmp3lame/gain_analysis.c ['fuzzer-encoder'] []
/src/LAME-fuzzers/fuzzer-encoder.cpp ['fuzzer-encoder'] ['fuzzer-encoder']
/src/lame/libmp3lame/presets.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/lame/libmp3lame/takehiro.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/lame/libmp3lame/lame.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/mpg123/src/libmpg123/frame.c ['fuzzer-encoder'] []
/src/LAME-fuzzers/fuzzing-headers/include/fuzzing/memory.hpp [] []
/src/mpg123/src/libmpg123/layer1.c [] []
/src/lame/libmp3lame/version.c ['fuzzer-encoder'] ['fuzzer-encoder']
/usr/local/bin/../include/c++/v1/istream [] []
/src/mpg123/src/libmpg123/id3.c ['fuzzer-encoder'] []
/src/mpg123/src/libmpg123/readers.c ['fuzzer-encoder'] []
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h [] []
/src/lame/libmp3lame/quantize.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/lame/libmp3lame/mpglib_interface.c ['fuzzer-encoder'] []
/src/mpg123/./src/libmpg123/synth_ntom.h [] []
/src/mpg123/src/libmpg123/synth_s32.c [] []
/src/mpg123/./src/libmpg123/getbits.h [] []
/src/lame/libmp3lame/psymodel.c ['fuzzer-encoder'] ['fuzzer-encoder']
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/lame/libmp3lame/vbrquantize.c [] []
/src/mpg123/./src/libmpg123/dither_impl.h ['fuzzer-encoder'] []
/src/mpg123/./src/libmpg123/synth_mono.h [] []
/src/mpg123/src/compat/compat_str.c ['fuzzer-encoder'] []
/src/mpg123/src/libmpg123/synth_real.c [] []
/src/LAME-fuzzers/fuzzing-headers/include/fuzzing/datasource/datasource.hpp ['fuzzer-encoder'] ['fuzzer-encoder']
/src/mpg123/./src/libmpg123/gapless.h [] []
/src/mpg123/src/libmpg123/equalizer.c [] []
/src/mpg123/src/libmpg123/layer2.c [] []
/src/mpg123/src/libmpg123/format.c ['fuzzer-encoder'] []
/usr/include/x86_64-linux-gnu/bits/byteswap.h [] []
/src/lame/libmp3lame/vector/xmm_quantize_sub.c ['fuzzer-encoder'] []
/src/lame/libmp3lame/util.c ['fuzzer-encoder'] ['fuzzer-encoder']
/src/mpg123/src/libmpg123/dct64.c [] []

Directories in report

Directory
/usr/include/
/src/lame/libmp3lame/
/src/LAME-fuzzers/
/usr/local/bin/../include/c++/v1/
/src/mpg123/./src/libmpg123/
/src/lame/libmp3lame/vector/
/usr/include/x86_64-linux-gnu/sys/
/usr/include/x86_64-linux-gnu/bits/
/src/LAME-fuzzers/fuzzing-headers/include/fuzzing/datasource/
/src/LAME-fuzzers/fuzzing-headers/include/fuzzing/
/src/mpg123/src/compat/
/src/mpg123/src/libmpg123/