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_parsers

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 559 47.1%
gold [1:9] 25 2.10%
yellow [10:29] 11 0.92%
greenyellow [30:49] 4 0.33%
lawngreen 50+ 586 49.4%
All colors 1185 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
92 464 date::year_month_day::from_days(std::__1::chrono::duration >) call site: 00464 __clang_call_terminate
86 733 std::__1::basic_ostream >& date::to_stream , std::__1::chrono::duration > >(std::__1::basic_ostream >&, char const*, date::fields > > const&, std::__1::basic_string , std::__1::allocator > const*, std::__1::chrono::duration > const*) call site: 00733 _ZN4date6detail3mslIcEENSt3__19enable_ifIXsr3std7is_sameIT_cEE5valueENS0_14string_literalIcLm3EEEE4typeENS2_5ratioILl1ELl1000000EEE
49 308 std::__1::basic_istream >& date::from_stream , std::__1::chrono::duration >, std::__1::allocator >(std::__1::basic_istream >&, char const*, date::fields > >&, std::__1::basic_string , std::__1::allocator >*, std::__1::chrono::duration >*) call site: 00308 isspace
45 261 void date::detail::read >(std::__1::basic_istream >&, date::detail::rld) call site: 00261 _ZN4date6detail7round_iINSt3__16chrono8durationIxNS2_5ratioILl1ELl1000000EEEEEeNS5_ILl1ELl1EEEEENS2_9enable_ifIXntsr3std6chrono23treat_as_floating_pointINT_3repEEE5valueESA_E4typeERKNS4_IT0_T1_EE
38 825 std::__1::basic_ostream >& date::operator<< >(std::__1::basic_ostream >&, date::hh_mm_ss > > const&) call site: 00825
37 575 std::__1::basic_istream >& date::from_stream , std::__1::chrono::duration >, std::__1::allocator >(std::__1::basic_istream >&, char const*, date::fields > >&, std::__1::basic_string , std::__1::allocator >*, std::__1::chrono::duration >*) call site: 00575
23 368 std::__1::basic_istream >& date::from_stream , std::__1::chrono::duration >, std::__1::allocator >(std::__1::basic_istream >&, char const*, date::fields > >&, std::__1::basic_string , std::__1::allocator >*, std::__1::chrono::duration >*) call site: 00368
18 681 std::__1::basic_ostream >& date::to_stream , std::__1::chrono::duration > >(std::__1::basic_ostream >&, char const*, date::fields > > const&, std::__1::basic_string , std::__1::allocator > const*, std::__1::chrono::duration > const*) call site: 00681 _ZN4date6detail3absIxNSt3__15ratioILl1ELl1EEEEENS2_9enable_ifIXsr3std14numeric_limitsIT_EE9is_signedENS2_6chrono8durationIS6_T0_EEE4typeESA_
14 713 std::__1::basic_ostream >& date::operator<< >(std::__1::basic_ostream >&, date::year const&) call site: 00713
12 409 date::year::max() call site: 00409
9 241 std::__1::basic_istream >& date::from_stream , std::__1::chrono::duration >, std::__1::allocator >(std::__1::basic_istream >&, char const*, date::fields > >&, std::__1::basic_string , std::__1::allocator >*, std::__1::chrono::duration >*) call site: 00241
7 452 date::weekday::weekday(std::__1::chrono::time_point > > const&) call site: 00452 __clang_call_terminate

Runtime coverage analysis

Covered functions
450
Functions that are reachable but not covered
265
Reachable functions
882
Percentage of reachable functions covered
69.95%
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/pistache/build/../tests/fuzzers/fuzz_parser.cpp 65
/src/pistache/build/../include/pistache/http_header.h 28
/src/pistache/src/common/http_header.cc 27
/src/pistache/src/common/mime.cc 5
/usr/local/bin/../include/c++/v1/optional 2
/src/pistache/src/../include/pistache/http_defs.h 2
/src/pistache/src/common/http_defs.cc 8
/usr/local/bin/../include/c++/v1/stdexcept 3
/src/pistache/build/../include/pistache/mime.h 2
/src/pistache/src/../include/pistache/http_header.h 1
/src/pistache/src/../include/pistache/base64.h 4
/src/pistache/src/common/base64.cc 7
/src/pistache/build/../include/pistache/http_defs.h 1
/src/pistache/src/../subprojects/hinnant-date/include/date/date.h 190
/src/pistache/src/common/net.cc 8
/src/pistache/src/../include/pistache/net.h 4
/src/pistache/src/common/cookie.cc 16
/src/pistache/src/../include/pistache/stream.h 15
/src/pistache/src/common/stream.cc 10
/src/pistache/build/../include/pistache/cookie.h 2
/src/pistache/src/common/http.cc 7
/src/pistache/build/../include/pistache/stream.h 2
/src/pistache/src/../include/pistache/http.h 3
/src/pistache/src/../include/pistache/http_headers.h 1
/src/pistache/build/../include/pistache/http.h 7
/src/pistache/build/../include/pistache/http_headers.h 1
/src/pistache/build/../include/pistache/net.h 1
/src/pistache/src/server/router.cc 7
/src/pistache/build/../include/pistache/router.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
Pistache::Rest::Swagger::install(Pistache::Rest::Router&)::$_0::operator()(Pistache::Rest::Requestconst&,Pistache::Http::ResponseWriter)const /src/pistache/src/common/description.cc 3 ['N/A', 'N/A', 'N/A'] 17 0 324 67 52 526 0 1957 869
Pistache::Tcp::Transport::onReady(Pistache::Aio::FdSetconst&) /src/pistache/src/common/transport.cc 2 ['N/A', 'N/A'] 8 0 220 38 7 306 0 846 675
Pistache::Http::Header::Accept::parseRaw(charconst*,unsignedlong) /src/pistache/src/common/http_header.cc 3 ['N/A', 'N/A', 'size_t'] 6 0 214 62 53 86 0 389 307
Pistache::Rest::Private::RouterHandler::onRequest(Pistache::Http::Requestconst&,Pistache::Http::ResponseWriter) /src/pistache/src/server/router.cc 3 ['N/A', 'N/A', 'N/A'] 18 0 26 5 5 579 0 1970 215
Pistache::Http::Private::RequestLineStep::apply(Pistache::StreamCursor&) /src/pistache/src/common/http.cc 2 ['N/A', 'N/A'] 4 0 538 148 132 65 0 236 161
Pistache::Http::Handler::onInput(charconst*,unsignedlong,std::__1::shared_ptr const&) /src/pistache/src/common/http.cc 4 ['N/A', 'N/A', 'size_t', 'N/A'] 17 0 405 85 58 569 0 1903 126
Pistache::Aio::AsyncImpl::Worker::Worker(Pistache::Aio::Reactor*,std::__1::basic_string ,std::__1::allocator >const&) /src/pistache/src/common/reactor.cc 3 ['N/A', 'N/A', 'N/A'] 10 0 41 10 8 76 0 254 124
Pistache::Http::Private::HeadersStep::apply(Pistache::StreamCursor&) /src/pistache/src/common/http.cc 2 ['N/A', 'N/A'] 19 0 424 112 88 448 0 1041 120
Pistache::Async::Private::impl::Continuation ,std::__1::allocator >const&,Pistache::Http::Mime::MediaTypeconst&)::$_1,Pistache::Async::Private::Throw,Pistache::Async::Promise (long)>::doResolve(std::__1::shared_ptr >const&) /src/pistache/src/../include/pistache/async.h 2 ['N/A', 'N/A'] 11 0 30 5 5 132 0 316 112
Pistache::Aio::SyncImpl::runOnce() /src/pistache/src/common/reactor.cc 1 ['N/A'] 4 0 125 28 27 41 0 124 110

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

Functions statically reachable by fuzzers
50.0%
795 / 1578
Cyclomatic complexity statically reachable by fuzzers
63.0%
5470 / 8655

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/pistache/build/../tests/fuzzers/fuzz_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=['date::year_month_day::from_days(std::__1::chrono::duration >)', 'std::__1::basic_ostream >& date::to_stream, std::__1::chrono::duration > >(std::__1::basic_ostream >&, char const*, date::fields > > const&, std::__1::basic_string, std::__1::allocator > const*, std::__1::chrono::duration > const*)', 'std::__1::basic_istream >& date::from_stream, std::__1::chrono::duration >, std::__1::allocator >(std::__1::basic_istream >&, char const*, date::fields > >&, std::__1::basic_string, std::__1::allocator >*, std::__1::chrono::duration >*)', 'void date::detail::read>(std::__1::basic_istream >&, date::detail::rld)', 'std::__1::basic_ostream >& date::operator<<  >(std::__1::basic_ostream >&, date::hh_mm_ss > > const&)', 'std::__1::basic_istream >& date::from_stream, std::__1::chrono::duration >, std::__1::allocator >(std::__1::basic_istream >&, char const*, date::fields > >&, std::__1::basic_string, std::__1::allocator >*, std::__1::chrono::duration >*)', 'std::__1::basic_istream >& date::from_stream, std::__1::chrono::duration >, std::__1::allocator >(std::__1::basic_istream >&, char const*, date::fields > >&, std::__1::basic_string, std::__1::allocator >*, std::__1::chrono::duration >*)', 'std::__1::basic_ostream >& date::to_stream, std::__1::chrono::duration > >(std::__1::basic_ostream >&, char const*, date::fields > > const&, std::__1::basic_string, std::__1::allocator > const*, std::__1::chrono::duration > const*)', 'std::__1::basic_ostream >& date::operator<<  >(std::__1::basic_ostream >&, date::year const&)', 'date::year::max()']

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/pistache/src/common/http_defs.cc ['fuzz_parsers'] ['fuzz_parsers']
/src/pistache/build/../include/pistache/cookie.h ['fuzz_parsers'] []
/src/pistache/build/../include/pistache/http.h ['fuzz_parsers'] []
/src/pistache/src/common/peer.cc [] []
/usr/include/x86_64-linux-gnu/bits/byteswap.h [] []
/src/pistache/build/../tests/fuzzers/fuzz_parser.cpp ['fuzz_parsers'] []
/src/pistache/src/common/reactor.cc [] []
/src/pistache/build/../include/pistache/router.h ['fuzz_parsers'] []
/src/pistache/src/common/ps_basename.cc [] []
/usr/local/bin/../include/c++/v1/stdexcept ['fuzz_parsers'] []
/src/pistache/build/../include/pistache/http_header.h ['fuzz_parsers'] []
/src/pistache/src/common/description.cc [] []
/src/pistache/src/common/os.cc [] []
/src/pistache/src/common/pist_syslog.cc [] []
/src/pistache/src/../include/pistache/typeid.h [] []
/src/pistache/src/../include/pistache/http.h ['fuzz_parsers'] []
/src/pistache/src/../include/pistache/mime.h [] []
/src/pistache/src/../include/pistache/stream.h ['fuzz_parsers'] []
/src/pistache/src/../include/pistache/http_headers.h ['fuzz_parsers'] []
/usr/local/bin/../include/c++/v1/__exception/exception_ptr.h [] []
/src/pistache/src/../subprojects/hinnant-date/include/date/date.h ['fuzz_parsers'] []
/src/pistache/src/../include/pistache/os.h [] []
/src/pistache/src/../include/pistache/description.h [] []
/src/pistache/src/../include/pistache/net.h ['fuzz_parsers'] []
/src/pistache/build/../include/pistache/http_defs.h ['fuzz_parsers'] []
/src/pistache/build/../include/pistache/mime.h ['fuzz_parsers'] []
/usr/local/bin/../include/c++/v1/istream [] []
/src/pistache/src/../include/pistache/base64.h ['fuzz_parsers'] []
/src/pistache/src/../include/pistache/reactor.h [] []
/src/pistache/src/common/base64.cc ['fuzz_parsers'] ['fuzz_parsers']
/src/pistache/src/../include/pistache/flags.h [] []
/src/pistache/src/../include/pistache/http_header.h ['fuzz_parsers'] []
/src/pistache/src/server/router.cc ['fuzz_parsers'] ['fuzz_parsers']
/src/pistache/src/common/http.cc ['fuzz_parsers'] ['fuzz_parsers']
/src/pistache/src/../include/pistache/mailbox.h [] []
/src/pistache/src/common/cookie.cc ['fuzz_parsers'] ['fuzz_parsers']
/usr/local/bin/../include/c++/v1/sstream [] []
/usr/local/bin/../include/c++/v1/optional ['fuzz_parsers'] []
/usr/local/bin/../include/c++/v1/__charconv/from_chars_integral.h [] []
/src/pistache/src/../include/pistache/async.h [] []
/src/pistache/build/../include/pistache/stream.h ['fuzz_parsers'] []
/src/pistache/src/../include/pistache/cookie.h [] []
/src/pistache/src/../include/pistache/tcp.h [] []
/src/pistache/src/common/ps_strl.cc [] []
/usr/local/bin/../include/c++/v1/string [] []
/src/pistache/src/common/http_header.cc ['fuzz_parsers'] ['fuzz_parsers']
/src/pistache/src/common/mime.cc ['fuzz_parsers'] ['fuzz_parsers']
/src/pistache/src/common/transport.cc [] []
/src/pistache/src/../include/pistache/iterator_adapter.h [] []
/src/pistache/src/common/stream.cc ['fuzz_parsers'] ['fuzz_parsers']
/src/pistache/build/../include/pistache/net.h ['fuzz_parsers'] []
/src/pistache/src/../include/pistache/prototype.h [] []
/src/pistache/build/../include/pistache/http_headers.h ['fuzz_parsers'] []
/src/pistache/src/common/http_headers.cc [] []
/src/pistache/src/../include/pistache/http_defs.h ['fuzz_parsers'] []
/src/pistache/src/../include/pistache/transport.h [] []
/src/pistache/src/common/net.cc ['fuzz_parsers'] ['fuzz_parsers']
/usr/local/bin/../include/c++/v1/__exception/exception.h [] []
/src/pistache/src/common/tcp.cc [] []
/src/pistache/src/../include/pistache/router.h [] []

Directories in report

Directory
/src/pistache/src/../include/pistache/
/src/pistache/build/../tests/fuzzers/
/src/pistache/src/server/
/usr/include/x86_64-linux-gnu/bits/
/usr/local/bin/../include/c++/v1/__charconv/
/usr/local/bin/../include/c++/v1/__exception/
/src/pistache/src/common/
/src/pistache/src/../subprojects/hinnant-date/include/date/
/usr/local/bin/../include/c++/v1/
/src/pistache/build/../include/pistache/