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: parse_cert_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 120 71.8%
gold [1:9] 2 1.19%
yellow [10:29] 7 4.19%
greenyellow [30:49] 15 8.98%
lawngreen 50+ 23 13.7%
All colors 167 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
28 49 phosphor::certs::parseCert(std::__1::basic_string , std::__1::allocator > const&) call site: 00049 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_29unsigned_integral_except_boolEmEEDaPKcNS0_8log_flagIJDpT_EEET0_
23 129 phosphor::certs::validateCertificateAgainstStore(x509_store_st&, x509_st&) call site: 00129 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_16string_like_typeEPKcEEDaS3_NS0_8log_flagIJDpT_EEERKT0_
18 80 phosphor::certs::parseCert(std::__1::basic_string , std::__1::allocator > const&) call site: 00080 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_16string_like_typeENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEDaPKcNS0_8log_flagIJDpT_EEERKT0_
15 33 sdbusplus::server::transaction::details::Transaction::Transaction() call site: 00033 sd_journal_send_with_location
10 153 phosphor::certs::validateCertificateAgainstStore(x509_store_st&, x509_st&) call site: 00153 X509_verify_cert_error_string
7 15 lg2::details::value_to_string(unsigned long, unsigned long) call site: 00015 _ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_11flag_field8EETpTkNS0_9log_flagsEJNS0_12flag_field16EEEEDaNS0_8log_flagIJDpT_EEENS4_IJDpT0_EEE
6 1 LLVMFuzzerTestOneInput call site: 00001
6 25 lg2::details::do_log(lg2::level, std::__1::source_location const&, char const*, ...) call site: 00025
2 118 phosphor::certs::validateCertificateAgainstStore(x509_store_st&, x509_st&) call site: 00118
2 121 phosphor::certs::validateCertificateAgainstStore(x509_store_st&, x509_st&) call site: 00121
1 12 lg2::details::value_to_string(unsigned long, long) call site: 00012
1 23 lg2::details::do_log(lg2::level, std::__1::source_location const&, char const*, ...) call site: 00023

Runtime coverage analysis

Covered functions
19
Functions that are reachable but not covered
150
Reachable functions
179
Percentage of reachable functions covered
16.2%
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/phosphor-certificate-manager/builddir/../fuzzing/parse_cert_fuzzer.cpp 1
/src/phosphor-certificate-manager/builddir/../x509_utils.cpp 5
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2.hpp 15
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/conversion.hpp 18
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/lg2_logger.cpp 4
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/flags.hpp 26
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-logging/lib/include/phosphor-logging/elog-errors.hpp 1
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/log.hpp 9
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/elog.hpp 3
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/server/transaction.cpp 1
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/server/transaction.hpp 1
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-dbus-interfaces/gen/xyz/openbmc_project/Certs/error.hpp 2
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/exception.hpp 4
/usr/local/bin/../include/c++/v1/__exception/exception.h 1
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/header.hpp 1
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-dbus-interfaces/gen/xyz/openbmc_project/Common/error.hpp 2

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
sdbusplus::exception::throw_via_json(nlohmann::json_abi_v3_12_0::basic_json ,std::__1::allocator >,bool,long,unsignedlong,double,std::__1::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::__1::vector >,void>const&,std::__1::source_locationconst&) /src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/exception.cpp 2 ['N/A', 'N/A'] 12 0 116 21 16 112 0 306 298
lg2::details::cerr_extra_output(lg2::level,std::__1::source_locationconst&,std::__1::basic_string ,std::__1::allocator >const&) /src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/lg2_logger.cpp 3 ['int', 'N/A', 'N/A'] 2 0 294 57 50 14 0 83 79
sdbusplus::bus_t::new_system() /src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/bus.cpp 1 ['N/A'] 5 0 76 13 13 38 0 83 67
phosphor::certs::loadCert(std::__1::basic_string ,std::__1::allocator >const&) /src/phosphor-certificate-manager/builddir/../x509_utils.cpp 2 ['N/A', 'N/A'] 8 0 149 25 18 87 0 137 40

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

Functions statically reachable by fuzzers
50.0%
177 / 355
Cyclomatic complexity statically reachable by fuzzers
60.0%
803 / 1334

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

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/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/conversion.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/server/transaction.cpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../fuzzing/parse_cert_fuzzer.cpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-dbus-interfaces/gen/xyz/openbmc_project/Certs/error.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/exception.cpp [] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/message.hpp [] []
/usr/local/bin/../include/c++/v1/sstream [] []
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-dbus-interfaces/gen/xyz/openbmc_project/Common/error.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/nlohmann_json/single_include/nlohmann/json.hpp [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/elog.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../x509_utils.cpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-logging/lib/lg2_eventfilter.cpp [] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/server/transaction.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-logging/lib/include/phosphor-logging/elog-errors.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/header.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/bus.cpp [] []
/usr/local/bin/../include/c++/v1/string [] []
/usr/local/bin/../include/c++/v1/__exception/exception.h ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/sdbus.hpp [] []
/usr/local/bin/../include/c++/v1/__exception/exception_ptr.h [] []
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/lg2_logger.cpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/bus.hpp [] []
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/log.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/flags.hpp ['parse_cert_fuzzer'] []
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/exception.hpp ['parse_cert_fuzzer'] []

Directories in report

Directory
/usr/local/bin/../include/c++/v1/
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/server/
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-dbus-interfaces/gen/xyz/openbmc_project/Common/
/src/phosphor-certificate-manager/builddir/../fuzzing/
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-dbus-interfaces/gen/xyz/openbmc_project/Certs/
/src/phosphor-certificate-manager/builddir/../
/src/phosphor-certificate-manager/builddir/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/server/
/src/phosphor-certificate-manager/builddir/../subprojects/nlohmann_json/single_include/nlohmann/
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/src/
/usr/local/bin/../include/c++/v1/__exception/
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-logging/lib/
/src/phosphor-certificate-manager/builddir/../subprojects/sdbusplus/include/sdbusplus/
/src/phosphor-certificate-manager/builddir/subprojects/phosphor-logging/lib/include/phosphor-logging/