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: fuzz_fru_parser

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 139 60.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 3 1.31%
lawngreen 50+ 87 37.9%
All colors 229 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
21 30 parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array , std::__1::allocator >, std::__1::basic_string , std::__1::allocator > >, 41ul>&) call site: 00030 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_16string_like_typeEPKcEEDaS3_NS0_8log_flagIJDpT_EEERKT0_
21 55 _append_to_dict(unsigned char, unsigned char*, std::__1::array , std::__1::allocator >, std::__1::basic_string , std::__1::allocator > >, 41ul>&) call site: 00055 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_16string_like_typeEPcEEDaPKcNS0_8log_flagIJDpT_EEERKT0_
18 3 parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array , std::__1::allocator >, std::__1::basic_string , std::__1::allocator > >, 41ul>&) call site: 00003 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_29unsigned_integral_except_boolEmEEDaPKcNS0_8log_flagIJDpT_EEET0_
18 77 _append_to_dict(unsigned char, unsigned char*, std::__1::array , std::__1::allocator >, std::__1::basic_string , std::__1::allocator > >, 41ul>&) call site: 00077 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_12pointer_typeEPhEEDaPKcNS0_8log_flagIJDpT_EEET0_
13 163 verifyFruData(unsigned char const*, unsigned long, bool) call site: 00163 _ZN3lg27details14log_conversion4stepIJRNS_5levelERKNSt3__115source_locationERPKcETpTkNS0_9log_flagsEJNS0_8flag_hexEERKhJEEEvONS5_5tupleIJDpT_EEERKNS0_10header_strENS0_8log_flagIJDpT0_EEEOT1_DpOT2_
9 180 verifyFruData(unsigned char const*, unsigned long, bool) call site: 00180 _ZN3lg27details14log_conversion4stepIJRNS_5levelERKNSt3__115source_locationERPKcETpTkNS0_9log_flagsEJNS0_8flag_hexEERhJRKNS0_10header_strERKNS0_8log_flagIJSC_EEERKhEEEvONS5_5tupleIJDpT_EEESG_NSH_IJDpT0_EEEOT1_DpOT2_
8 109 parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array , std::__1::allocator >, std::__1::basic_string , std::__1::allocator > >, 41ul>&) call site: 00109 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_16string_like_typeEA512_cEEDaPKcNS0_8log_flagIJDpT_EEERKT0_
8 196 ipmiPopulateFruAreas(unsigned char*, unsigned long, std::__1::vector >, std::__1::allocator > > >&) call site: 00196 _ZN3lg27detailsL11log_convertITpTkNS0_9log_flagsEJETkNS0_29unsigned_integral_except_boolEmEEDaPKcNS0_8log_flagIJDpT_EEET0_
5 130 parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array , std::__1::allocator >, std::__1::basic_string , std::__1::allocator > >, 41ul>&) call site: 00130
4 210 ipmiPopulateFruAreas(unsigned char*, unsigned long, std::__1::vector >, std::__1::allocator > > >&) call site: 00210
3 143 lg2::details::value_to_string(unsigned long, unsigned long) call site: 00143 _ZN3lg27detailsorITpTkNS0_9log_flagsEJNS0_11flag_field8EETpTkNS0_9log_flagsEJNS0_12flag_field16EEEEDaNS0_8log_flagIJDpT_EEENS4_IJDpT0_EEE
3 158 LLVMFuzzerTestOneInput call site: 00158

Runtime coverage analysis

Covered functions
34
Functions that are reachable but not covered
198
Reachable functions
249
Percentage of reachable functions covered
20.48%
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/fuzz_fru_parser.cpp 1
/src/ipmi-fru-parser/build/../frup.cpp 7
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2.hpp 42
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/conversion.hpp 47
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/header.hpp 1
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/flags.hpp 24
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/flags.hpp 8
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/lg2_logger.cpp 4
/src/ipmi-fru-parser/build/../writefrudata.cpp 7
/src/ipmi-fru-parser/fru_area.hpp 3
/src/ipmi-fru-parser/build/../fru_area.cpp 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
validateFRUArea(unsignedchar,charconst*,sdbusplus::bus_t&) /src/ipmi-fru-parser/build/../writefrudata.cpp 3 ['char', 'N/A', 'N/A'] 16 0 474 67 44 541 0 1128 609
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/ipmi-fru-parser/build/../subprojects/sdbusplus/src/exception.cpp 2 ['N/A', 'N/A'] 14 0 116 21 16 115 0 261 247
lg2::details::cerr_extra_output(lg2::level,std::__1::source_locationconst&,std::__1::basic_string ,std::__1::allocator >const&) /src/ipmi-fru-parser/subprojects/phosphor-logging/lib/lg2_logger.cpp 3 ['int', 'N/A', 'N/A'] 2 0 294 57 50 14 0 83 73
IPMIFruArea::IPMIFruArea(unsignedchar,ipmi_fru_area_type) /src/ipmi-fru-parser/build/../fru_area.cpp 3 ['N/A', 'char', 'int'] 8 0 137 27 26 30 0 85 55

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

Functions statically reachable by fuzzers
51.0%
353 / 694
Cyclomatic complexity statically reachable by fuzzers
65.0%
1441 / 2215

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

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

/src/fuzz_fru_parser.cpp

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array, std::__1::allocator >, std::__1::basic_string, std::__1::allocator > >, 41ul>&)', '_append_to_dict(unsigned char, unsigned char*, std::__1::array, std::__1::allocator >, std::__1::basic_string, std::__1::allocator > >, 41ul>&)', 'parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array, std::__1::allocator >, std::__1::basic_string, std::__1::allocator > >, 41ul>&)', '_append_to_dict(unsigned char, unsigned char*, std::__1::array, std::__1::allocator >, std::__1::basic_string, std::__1::allocator > >, 41ul>&)', 'verifyFruData(unsigned char const*, unsigned long, bool)', 'verifyFruData(unsigned char const*, unsigned long, bool)', 'parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array, std::__1::allocator >, std::__1::basic_string, std::__1::allocator > >, 41ul>&)', 'ipmiPopulateFruAreas(unsigned char*, unsigned long, std::__1::vector >, std::__1::allocator > > >&)', 'parse_fru_area(unsigned char, void const*, unsigned long, std::__1::array, std::__1::allocator >, std::__1::basic_string, std::__1::allocator > >, 41ul>&)', 'ipmiPopulateFruAreas(unsigned char*, unsigned long, std::__1::vector >, std::__1::allocator > > >&)']

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
[] []
/usr/local/bin/../include/c++/v1/__format/format_arg_store.h [] []
/src/ipmi-fru-parser/build/fru-gen.cpp [] []
/usr/local/bin/../include/c++/v1/__format/parser_std_format_spec.h [] []
/usr/local/bin/../include/c++/v1/__format/write_escaped.h [] []
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/message.hpp [] []
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/src/exception.cpp [] []
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/message/native_types.hpp [] []
/src/ipmi-fru-parser/build/extra-properties-gen.cpp [] []
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2.hpp ['fuzz_fru_parser'] []
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/flags.hpp ['fuzz_fru_parser'] ['fuzz_fru_parser']
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/sdjournal.cpp [] []
/usr/local/bin/../include/c++/v1/sstream [] []
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/lg2_logger.cpp ['fuzz_fru_parser'] ['fuzz_fru_parser']
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/bus.hpp [] []
/usr/local/bin/../include/c++/v1/optional [] []
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/header.hpp ['fuzz_fru_parser'] []
/src/ipmi-fru-parser/build/../writefrudata.cpp ['fuzz_fru_parser'] []
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/message/read.hpp [] []
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/exception.hpp [] []
/src/ipmi-fru-parser/build/../frup.cpp ['fuzz_fru_parser'] []
/src/ipmi-fru-parser/fru_area.hpp ['fuzz_fru_parser'] ['fuzz_fru_parser']
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/flags.hpp ['fuzz_fru_parser'] ['fuzz_fru_parser']
/usr/local/bin/../include/c++/v1/__algorithm/ranges_upper_bound.h [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/ipmi-fru-parser/build/../fru_area.hpp [] ['fuzz_fru_parser']
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/include/phosphor-logging/sdjournal.hpp [] []
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/sdbus.hpp [] []
/usr/local/bin/../include/c++/v1/__exception/exception.h [] []
/src/ipmi-fru-parser/build/../subprojects/nlohmann_json/single_include/nlohmann/json.hpp [] []
/src/ipmi-fru-parser/build/../fru_area.cpp ['fuzz_fru_parser'] []
/src/ipmi-fru-parser/build/../frup.hpp [] []
/usr/local/bin/../include/c++/v1/variant [] []
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/conversion.hpp ['fuzz_fru_parser'] []
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/message/append.hpp [] []
/src/fuzz_fru_parser.cpp ['fuzz_fru_parser'] ['fuzz_fru_parser']
/usr/local/bin/../include/c++/v1/string [] []
/usr/local/bin/../include/c++/v1/__format/format_functions.h [] []

Directories in report

Directory
/src/ipmi-fru-parser/build/../
/src/
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/message/
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/
/usr/local/bin/../include/c++/v1/
/src/ipmi-fru-parser/
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/include/phosphor-logging/
/usr/local/bin/../include/c++/v1/__algorithm/
/usr/local/bin/../include/c++/v1/__exception/
/src/ipmi-fru-parser/build/../subprojects/phosphor-logging/lib/include/phosphor-logging/
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/src/
/src/ipmi-fru-parser/build/../subprojects/sdbusplus/include/sdbusplus/
/usr/local/bin/../include/c++/v1/__format/
/src/ipmi-fru-parser/build/
/src/ipmi-fru-parser/build/../subprojects/nlohmann_json/single_include/nlohmann/
/src/ipmi-fru-parser/subprojects/phosphor-logging/lib/include/phosphor-logging/lg2/