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

Fuzzer details

Fuzzer: upb/fuzz/file_descriptor_parsenew_fuzzer.cc

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 94 8.04%
gold [1:9] 29 2.48%
yellow [10:29] 14 1.19%
greenyellow [30:49] 8 0.68%
lawngreen 50+ 1023 87.5%
All colors 1168 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
22 121 _upb_Decoder_NewSubMessage call site: 00121 upb_Decode
11 108 _upb_Decoder_DecodeUnknownField call site: 00108 upb_Decoder_DecodeMessageSetItem
5 1037 upb_MtDecoder_ModifyField call site: 01037 upb_MtDecoder_ErrorFormat
3 55 _upb_Decoder_DecodeMessage call site: 00055 upb_ExtensionRegistry_Lookup
3 90 _upb_BigEndian_Swap32 call site: 00090 upb_EpsCopyInputStream_CheckSize
3 104 _upb_Decoder_DecodeUnknownField call site: 00104 _upb_Decoder_IsDone
3 146 _upb_BigEndian_Swap64 call site: 00146 _upb_BigEndian_Swap32
3 291 _upb_Message_HasNonExtensionField call site: 00291 _upb_getoneofcase_field
2 84 upb_strtable_lookup2 call site: 00084 _upb_Decoder_DecodeLongVarint
2 95 _upb_Decoder_DecodeMessage call site: 00095 _upb_Message_Getext
2 98 _upb_Message_Getexts call site: 00098 realloc_internal
2 524 upb_MiniTable_DecodeBase92Varint call site: 00524 upb_MtDecoder_ErrorFormat

Runtime coverage analysis

Covered functions
550
Functions that are reachable but not covered
32
Reachable functions
469
Percentage of reachable functions covered
93.18%
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
upb/fuzz/file_descriptor_parsenew_fuzzer.cc 1
./upb/upb.hpp 5
./upb/mem/arena.h 5
upb/mem/arena.c 11
./upb/mem/alloc.h 4
bazel-out/k8-opt-ST-8ab593b821b7/bin/external/com_google_protobuf/src/google/protobuf/descriptor.upb.h 66
./upb/message/internal.h 3
upb/wire/decode.c 20
./upb/wire/eps_copy_input_stream.h 5
./upb/wire/decode_internal.h 2
upb/message/message.c 5
./upb/base/log2.h 2
upb/mini_table/extension_registry.c 4
upb/hash/common.c 42
./upb/hash/common.h 7
./upb/wire/reader.h 1
./upb/wire/swap_internal.h 3
./upb/mini_table/message_internal.h 1
./upb/reflection/def.hpp 4
upb/reflection/def_pool.c 13
upb/base/status.c 5
./upb/base/string_view.h 2
./upb/mini_table/common.h 1
./upb/message/accessors.h 3
upb/reflection/def_type.c 3
upb/reflection/field_def.c 42
upb/reflection/message_def.c 32
upb/reflection/enum_def.c 12
upb/reflection/enum_value_def.c 8
upb/reflection/service_def.c 4
upb/reflection/def_builder.c 20
upb/reflection/file_def.c 9
./upb/reflection/def_builder_internal.h 5
./upb/mini_table/field_internal.h 10
./upb/collections/array_internal.h 2
./upb/reflection/def_type.h 1
upb/reflection/enum_reserved_range.c 1
./upb/reflection/desc_state_internal.h 1
upb/reflection/desc_state.c 1
upb/mini_table/encode.c 16
./upb/mini_table/common_internal.h 3
upb/mini_table/decode.c 40
upb/reflection/oneof_def.c 8
./upb/hash/str_table.h 1
upb/reflection/extension_range.c 3
upb/reflection/message_reserved_range.c 1
upb/reflection/method_def.c 2
upb/mini_table/common.c 2
./upb/mini_table/decode.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
encode_array /proc/self/cwd/upb/wire/encode.c 4 ['struct.upb_encstate *', 'char *', 'union.upb_MiniTableSub *', 'struct.upb_MiniTableField *'] 6 0 1514 214 59 73 20 356 259
_upb_Decoder_DecodeToArray /proc/self/cwd/upb/wire/decode.c 7 ['struct.upb_Decoder *', 'char *', 'char *', 'union.upb_MiniTableSub *', 'struct.upb_MiniTableField *', 'struct.upb_value *', 'int '] 7 0 810 61 8 63 0 245 140
_upb_Decoder_DecodeToMap /proc/self/cwd/upb/wire/decode.c 6 ['struct.upb_Decoder *', 'char *', 'char *', 'union.upb_MiniTableSub *', 'struct.upb_MiniTableField *', 'struct.upb_value *'] 13 0 354 35 6 114 0 430 38

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

Functions statically reachable by fuzzers
67.4%
546/810
Cyclomatic complexity statically reachable by fuzzers
75.1%
2144 / 2855

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
[] []
/proc/self/cwd/upb/wire/encode.c [] []
/proc/self/cwd/./upb/collections/map_sorter_internal.h [] []
/proc/self/cwd/upb/mem/arena.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/message/internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/external/utf8_range/naive.c [] []
/proc/self/cwd/upb/mini_table/encode.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/enum_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/def_pool.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/reflection/def_builder_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/external/utf8_range/utf8_range.h [] []
/proc/self/cwd/./upb/mini_table/common.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/reflection/def_type.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/wire/decode.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/mem/alloc.c [] []
/proc/self/cwd/upb/mini_table/extension_registry.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/upb.hpp ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/mini_table/decode.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/enum_value_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/desc_state.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/collections/map.c [] []
/proc/self/cwd/upb/reflection/service_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/fuzz/file_descriptor_parsenew_fuzzer.cc ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/oneof_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/enum_reserved_range.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/message_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/reflection/def_type.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/hash/common.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/base/status.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/wire/decode_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/hash/common.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/collections/array.c [] []
/proc/self/cwd/./upb/mem/arena.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/mini_table/enum_internal.h [] []
/proc/self/cwd/upb/reflection/message_reserved_range.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/mini_table/message_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/base/string_view.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/reflection/extension_range.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/mini_table/field_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/reflection/field_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/message/message.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/wire/eps_copy_input_stream.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/collections/map_sorter.c [] []
/proc/self/cwd/./upb/base/log2.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/reflection/desc_state_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/hash/str_table.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/wire/reader.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/wire/swap_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/reflection/def_builder.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/message/accessors.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/mem/alloc.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/reflection/def.hpp ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/reflection/file_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/collections/map_internal.h [] []
/proc/self/cwd/./upb/collections/array_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/upb/mini_table/common.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/upb/reflection/method_def.c ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']
/proc/self/cwd/./upb/mini_table/decode.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/./upb/mini_table/common_internal.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] []
/proc/self/cwd/bazel-out/k8-opt-ST-8ab593b821b7/bin/external/com_google_protobuf/src/google/protobuf/descriptor.upb.h ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc'] ['upb/fuzz/file_descriptor_parsenew_fuzzer.cc']

Directories in report

Directory
/proc/self/cwd/./upb/hash/
/proc/self/cwd/upb/mini_table/
/proc/self/cwd/upb/fuzz/
/proc/self/cwd/upb/message/
/proc/self/cwd/./upb/base/
/proc/self/cwd/upb/hash/
/proc/self/cwd/upb/base/
/proc/self/cwd/external/utf8_range/
/proc/self/cwd/./upb/reflection/
/proc/self/cwd/upb/reflection/
/proc/self/cwd/bazel-out/k8-opt-ST-8ab593b821b7/bin/external/com_google_protobuf/src/google/protobuf/
/proc/self/cwd/./upb/mem/
/proc/self/cwd/./upb/message/
/proc/self/cwd/./upb/collections/
/proc/self/cwd/./upb/
/proc/self/cwd/./upb/wire/
/proc/self/cwd/upb/mem/
/proc/self/cwd/upb/collections/
/proc/self/cwd/./upb/mini_table/
/proc/self/cwd/upb/wire/