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 174 26.5%
gold [1:9] 9 1.37%
yellow [10:29] 10 1.52%
greenyellow [30:49] 6 0.91%
lawngreen 50+ 456 69.6%
All colors 655 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
1412 1412 2 :

['hip_decode1_unclipped', 'AnalyzeSamples']

1412 1412 do_gain_analysis call site: 00000 /src/lame/libmp3lame/bitstream.c:994
127 127 1 :

['searchGlobalStepsizeMax']

127 127 outOfBitsStrategy call site: 00000 /src/lame/libmp3lame/vbrquantize.c:1217
115 502 5 :

['init_xrpow', 'VBR_encode_granule', 'bitpressure_strategy', 'trancate_smallspectrums', 'ResvFrameBegin']

115 637 VBR_old_iteration_loop call site: 00000 /src/lame/libmp3lame/quantize.c:1564
107 107 1 :

['hip_decode_exit']

107 113 freegfc call site: 00018 /src/lame/libmp3lame/util.c:157
93 93 1 :

['set_frame_pinfo']

93 103 lame_encode_mp3_frame call site: 00000 /src/lame/libmp3lame/encoder.c:554
87 87 1 :

['id3v2AddAudioDuration']

89 256 lame_get_id3v2_tag call site: 00422 /src/lame/libmp3lame/id3tag.c:1882
70 70 1 :

['id3v2_add_utf8_lng']

70 70 copyV1ToV2 call site: 00128 /src/lame/libmp3lame/id3tag.c:235
65 68 2 :

['id3v2_get_language', 'id3v2_add_utf8']

65 68 id3tag_set_comment call site: 00177 /src/lame/libmp3lame/id3tag.c:1365
27 27 1 :

['writeLoBytes']

27 27 set_frame_wxxx call site: 00449 /src/lame/libmp3lame/id3tag.c:1740
21 21 1 :

['writeUcs2s']

48 50 set_frame_wxxx call site: 00447 /src/lame/libmp3lame/id3tag.c:1730
21 21 1 :

['writeUcs2s']

21 21 set_frame_comment call site: 00438 /src/lame/libmp3lame/id3tag.c:1674
21 21 1 :

['writeUcs2s']

21 21 set_frame_custom2 call site: 00459 /src/lame/libmp3lame/id3tag.c:1707

Runtime coverage analysis

Covered functions
416
Functions that are reachable but not covered
161
Reachable functions
398
Percentage of reachable functions covered
59.55%
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 9
/src/lame/libmp3lame/lame.c 14
/src/lame/libmp3lame/util.c 19
/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/mpg123/src/libmpg123/lfs_wrap.c 2
/src/lame/libmp3lame/set_get.c 41
/src/lame/libmp3lame/id3tag.c 57
/src/lame/libmp3lame/version.c 3
/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 1
/src/lame/libmp3lame/quantize.c 1
/src/lame/libmp3lame/psymodel.c 7
/src/lame/libmp3lame/fft.c 1
/src/lame/libmp3lame/gain_analysis.c 2
/src/mpg123/src/libmpg123/../common/sample.h 1
/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 ['N/A', 'N/A', 'size_t', 'bool'] 23 0 113 14 6 362 0 3086 2854
INT123_do_layer3 /src/mpg123/src/libmpg123/layer3.c 1 ['N/A'] 3 0 1086 137 45 12 0 277 267
mpg123_open_fixed_64 /src/mpg123/src/libmpg123/lfs_wrap.c 4 ['N/A', 'N/A', 'int', 'int'] 17 0 28 3 2 164 0 1306 175
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['N/A', 'N/A', 'size_t', 'bool'] 23 0 113 14 6 359 0 3066 117
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['N/A', 'N/A', 'size_t', 'bool'] 23 0 113 14 6 359 0 3065 116
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['N/A', 'N/A', 'size_t', 'bool'] 23 0 113 14 6 357 0 3055 106
EncoderCore ::Run(unsignedchar*,unsignedlong,bool) /src/LAME-fuzzers/fuzzer-encoder.cpp 4 ['N/A', 'N/A', 'size_t', 'bool'] 23 0 113 14 6 356 0 3053 104
id3tag_set_fieldvalue_ucs2 /src/lame/libmp3lame/id3tag.c 2 ['N/A', 'N/A'] 9 0 37 6 3 51 0 257 97
buffered_icy_fullread /src/mpg123/src/libmpg123/readers.c 3 ['N/A', 'N/A', 'size_t'] 5 0 24 3 2 11 0 107 80
lame_mp3_tags_fid /src/lame/libmp3lame/lame.c 2 ['N/A', 'N/A'] 4 0 105 19 6 23 0 116 78

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

Functions statically reachable by fuzzers
54.0%
683 / 1259
Cyclomatic complexity statically reachable by fuzzers
67.0%
5714 / 8519

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

Directories in report

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