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

Fuzzer details

Fuzzer: jsoncpp_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 2 2.53%
gold [1:9] 0 0.0%
yellow [10:29] 1 1.26%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 76 96.2%
All colors 79 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
0 17 3 :

['std::__1::basic_string , std::__1::allocator >::~basic_string()', 'std::__1::basic_string , std::__1::allocator >::basic_string (char const*)', 'Json::throwRuntimeError(std::__1::basic_string , std::__1::allocator > const&)']

0 17 Json::duplicateStringValue(charconst*,unsignedlong) call site: 00000 /src/jsoncpp/src/lib_json/json_value.cpp:122
0 0 None 0 194 Json::OurReader::readObject(Json::OurReader::Token&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1476
0 0 None 0 31 Json::OurReader::decodeDouble(Json::OurReader::Token&,Json::Value&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1657
0 0 1 :

['std::__1::numeric_limits ::infinity()']

0 31 Json::OurReader::decodeDouble(Json::OurReader::Token&,Json::Value&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1659
0 0 None 0 30 Json::OurReader::readObject(Json::OurReader::Token&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1474
0 0 None 0 17 Json::OurReader::readValue() call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1123
0 0 None 0 12 Json::Value::operator[](unsignedint) call site: 00000 /src/jsoncpp/src/lib_json/json_value.cpp:933
0 0 None 0 9 Json::OurReader::decodeString(Json::OurReader::Token&,std::__1::basic_string ,std::__1::allocator >&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1689
0 0 None 0 0 Json::OurReader::readToken(Json::OurReader::Token&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1181
0 0 None 0 0 Json::OurReader::readToken(Json::OurReader::Token&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1235
0 0 None 0 0 Json::OurReader::readToken(Json::OurReader::Token&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1243
0 0 None 0 0 Json::Value::CZString::operator==(Json::Value::CZStringconst&)const call site: 00000 /src/jsoncpp/src/lib_json/json_value.cpp:313

Runtime coverage analysis

Covered functions
97
Functions that are reachable but not covered
14
Reachable functions
74
Percentage of reachable functions covered
81.08%
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/jsoncpp/build/../src/test_lib_json/fuzz.cpp 1
/src/jsoncpp/src/lib_json/json_reader.cpp 7
/src/jsoncpp/include/json/reader.h 3
/src/jsoncpp/src/lib_json/json_value.cpp 16
/src/jsoncpp/include/json/value.h 5

Fuzzer: jsoncpp_proto_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 13 5.15%
gold [1:9] 0 0.0%
yellow [10:29] 1 0.39%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 238 94.4%
All colors 252 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
93 98 3 :

['json_proto::NumberValue::MergeFrom(json_proto::NumberValue const&)', 'json_proto::JsonValue::_internal_number_value() const', 'json_proto::JsonValue::_internal_mutable_number_value()']

101 106 json_proto::JsonValue::MergeImpl(google::protobuf::Message&,google::protobuf::Messageconst&) call site: 00000 /src/jsoncpp/build/genfiles/json.pb.cc:1483
66 71 3 :

['json_proto::JsonObject::MergeFrom(json_proto::JsonObject const&)', 'json_proto::JsonValue::_internal_mutable_object_value()', 'json_proto::JsonValue::_internal_object_value() const']

74 79 json_proto::JsonValue::MergeImpl(google::protobuf::Message&,google::protobuf::Messageconst&) call site: 00000 /src/jsoncpp/build/genfiles/json.pb.cc:1483
58 63 3 :

['json_proto::StringValue::MergeFrom(json_proto::StringValue const&)', 'json_proto::JsonValue::_internal_string_value() const', 'json_proto::JsonValue::_internal_mutable_string_value()']

66 71 json_proto::JsonValue::MergeImpl(google::protobuf::Message&,google::protobuf::Messageconst&) call site: 00000 /src/jsoncpp/build/genfiles/json.pb.cc:1483
57 62 3 :

['json_proto::JsonValue::_internal_mutable_array_value()', 'json_proto::ArrayValue::MergeFrom(json_proto::ArrayValue const&)', 'json_proto::JsonValue::_internal_array_value() const']

65 70 json_proto::JsonValue::MergeImpl(google::protobuf::Message&,google::protobuf::Messageconst&) call site: 00000 /src/jsoncpp/build/genfiles/json.pb.cc:1483
47 52 3 :

['json_proto::JsonValue::_internal_boolean_value() const', 'json_proto::JsonValue::_internal_mutable_boolean_value()', 'json_proto::BooleanValue::MergeFrom(json_proto::BooleanValue const&)']

55 60 json_proto::JsonValue::MergeImpl(google::protobuf::Message&,google::protobuf::Messageconst&) call site: 00000 /src/jsoncpp/build/genfiles/json.pb.cc:1483
0 17 3 :

['std::__1::basic_string , std::__1::allocator >::~basic_string()', 'std::__1::basic_string , std::__1::allocator >::basic_string (char const*)', 'Json::throwRuntimeError(std::__1::basic_string , std::__1::allocator > const&)']

0 17 Json::duplicateStringValue(charconst*,unsignedlong) call site: 00000 /src/jsoncpp/src/lib_json/json_value.cpp:122
0 0 None 8 8 json_proto::JsonObject::MergeImpl(google::protobuf::Message&,google::protobuf::Messageconst&) call site: 00000 /src/jsoncpp/build/genfiles/json.pb.cc:1007
0 0 None 0 194 Json::OurReader::readObject(Json::OurReader::Token&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1476
0 0 None 0 31 Json::OurReader::decodeDouble(Json::OurReader::Token&,Json::Value&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1657
0 0 1 :

['std::__1::numeric_limits ::infinity()']

0 31 Json::OurReader::decodeDouble(Json::OurReader::Token&,Json::Value&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1659
0 0 None 0 30 Json::OurReader::readObject(Json::OurReader::Token&) call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1474
0 0 None 0 17 Json::OurReader::readValue() call site: 00000 /src/jsoncpp/src/lib_json/json_reader.cpp:1123

Runtime coverage analysis

Covered functions
322
Functions that are reachable but not covered
28
Reachable functions
227
Percentage of reachable functions covered
87.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.
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/jsoncpp_fuzz_proto.cc 3
/src/jsoncpp/build/genfiles/json.pb.h 43
/src/jsoncpp/build/genfiles/json.pb.cc 27
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/message.h 2
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/message_lite.h 4
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/metadata_lite.h 8
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/generated_message_util.h 1
/src/json_proto_converter.h 2
/src/json_proto_converter.cc 5
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/arenastring.h 2
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/repeated_ptr_field.h 5
/src/jsoncpp/src/lib_json/json_reader.cpp 7
/src/jsoncpp/include/json/reader.h 3
/src/jsoncpp/src/lib_json/json_value.cpp 15
/src/jsoncpp/include/json/value.h 5

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
Json::OurReader::readObject(Json::OurReader::Token&) /src/jsoncpp/src/lib_json/json_reader.cpp 2 ['class.Json::OurReader *', 'class.Json::OurReader::Token *'] 12 0 577 144 140 185 5 948 867
Json::Reader::readObject(Json::Reader::Token&) /src/jsoncpp/src/lib_json/json_reader.cpp 2 ['class.Json::Reader *', 'class.Json::OurReader::Token *'] 14 0 477 120 119 177 6 843 532
Json::BuiltStyledStreamWriter::writeValue(Json::Valueconst&) /src/jsoncpp/src/lib_json/json_writer.cpp 2 ['struct.Json::BuiltStyledStreamWriter *', 'class.Json::Value *'] 6 0 375 71 51 167 4 592 463
Json::StyledWriter::writeValue(Json::Valueconst&) /src/jsoncpp/src/lib_json/json_writer.cpp 2 ['class.Json::StyledWriter *', 'class.Json::Value *'] 6 0 364 73 52 171 4 592 165
Json::StyledStreamWriter::writeValue(Json::Valueconst&) /src/jsoncpp/src/lib_json/json_writer.cpp 2 ['class.Json::StyledStreamWriter *', 'class.Json::Value *'] 9 0 366 73 52 171 4 588 159
json_proto::JsonValue::ByteSizeLong()const /src/jsoncpp/build/genfiles/json.pb.cc 1 ['class.json_proto::JsonValue *'] 18 0 76 10 11 102 9 136 118
Json::FastWriter::writeValue(Json::Valueconst&) /src/jsoncpp/src/lib_json/json_writer.cpp 2 ['class.Json::FastWriter *', 'class.Json::Value *'] 6 0 337 61 56 134 2 520 112
Json::operator<<(std::__1::basic_ostream >&,Json::Valueconst&) /src/jsoncpp/src/lib_json/json_writer.cpp 2 ['class.std::__1::basic_ostream *', 'class.Json::Value *'] 8 0 55 8 7 77 0 227 111
json_proto::JsonParseAPI::JsonParseAPI(json_proto::JsonParseAPIconst&) /src/jsoncpp/build/genfiles/json.pb.cc 2 ['class.json_proto::JsonParseAPI *', 'class.json_proto::JsonParseAPI *'] 7 0 104 15 15 96 0 149 110
json_proto::ArrayValue::_InternalParse(charconst*,google::protobuf::internal::ParseContext*) /src/jsoncpp/build/genfiles/json.pb.cc 3 ['class.json_proto::ArrayValue *', 'char *', 'class.google::protobuf::internal::ParseContext *'] 11 0 200 40 12 70 0 99 83

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

Functions statically reachable by fuzzers
38.0%
365 / 960
Cyclomatic complexity statically reachable by fuzzers
52.0%
2564 / 4905

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/json_proto_converter.h ['jsoncpp_proto_fuzzer'] []
/usr/local/bin/../include/c++/v1/iosfwd [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/wire_format.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/io/coded_stream.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/arena.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/endian.h [] []
/src/jsoncpp_fuzz_proto.cc ['jsoncpp_proto_fuzzer'] ['jsoncpp_proto_fuzzer']
/usr/local/bin/../include/c++/v1/exception [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/unknown_field_set.h [] []
/src/jsoncpp/include/json/value.h ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer'] ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer']
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/repeated_ptr_field.h ['jsoncpp_proto_fuzzer'] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/wire_format_lite.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/absl/base/casts.h [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/jsoncpp/include/json/writer.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/arena_cleanup.h [] []
/src/jsoncpp/build/genfiles/json.pb.h ['jsoncpp_proto_fuzzer'] ['jsoncpp_proto_fuzzer']
/src/jsoncpp/build/../src/test_lib_json/fuzz.cpp ['jsoncpp_fuzzer'] []
/src/jsoncpp/src/lib_json/json_tool.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/has_bits.h [] []
/src/jsoncpp/include/json/reader.h ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer'] ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer']
/src/jsoncpp/src/lib_json/json_reader.cpp ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer'] ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer']
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/arenastring.h ['jsoncpp_proto_fuzzer'] []
/src/jsoncpp/src/lib_json/json_valueiterator.inl [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/absl/numeric/bits.h [] []
/src/jsoncpp/src/lib_json/json_writer.cpp [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/arena_align.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/generated_message_util.h ['jsoncpp_proto_fuzzer'] []
/usr/local/bin/../include/c++/v1/istream [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/repeated_field.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/message_lite.h ['jsoncpp_proto_fuzzer'] []
/src/jsoncpp/build/genfiles/json.pb.cc ['jsoncpp_proto_fuzzer'] ['jsoncpp_proto_fuzzer']
/usr/local/bin/../include/c++/v1/math.h [] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/message.h ['jsoncpp_proto_fuzzer'] []
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/parse_context.h [] []
/src/json_proto_converter.cc ['jsoncpp_proto_fuzzer'] ['jsoncpp_proto_fuzzer']
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/metadata_lite.h ['jsoncpp_proto_fuzzer'] []
/src/jsoncpp/src/lib_json/json_value.cpp ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer'] ['jsoncpp_fuzzer', 'jsoncpp_proto_fuzzer']

Directories in report

Directory
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/
/usr/local/bin/../include/c++/v1/
/src/jsoncpp/build/../src/test_lib_json/
/src/jsoncpp/include/json/
/src/jsoncpp/build/genfiles/
/src/jsoncpp/src/lib_json/
/src/
/src/jsoncpp/build/../LPM/external.protobuf/include/absl/base/
/src/jsoncpp/build/../LPM/external.protobuf/include/google/protobuf/io/
/src/jsoncpp/build/../LPM/external.protobuf/include/absl/numeric/