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

Fuzzer details

Fuzzer: msg_parse_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 247 75.3%
gold [1:9] 1 0.30%
yellow [10:29] 0 0.0%
greenyellow [30:49] 1 0.30%
lawngreen 50+ 79 24.0%
All colors 328 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
625 625 2 :

['std::__1::__map_iterator , std::__1::__tree_node , void*>*, long> >::operator->() const', 'CUtils::ParseServerTime(CString const&)']

625 625 CMessage::InitTime() call site: 00000 /src/znc/src/Message.cpp:237
10 10 4 :

['__cxa_throw', 'std::out_of_range::out_of_range(char const*)', '__cxa_free_exception', '__cxa_allocate_exception']

10 10 bpstd::basic_string_view >::substr(unsignedlong,unsignedlong)const call site: 00000 /src/znc/third_party/bpstd/bpstd/string_view.hpp:711
7 7 1 :

['CString::StrCmp(CString const&, unsigned long) const']

7 7 CString::Equals(CStringconst&,CaseSensitivity)const call site: 00000 /src/znc/src/ZNCString.cpp:136
4 4 2 :

['gettimeofday', 'time']

4 4 CUtils::GetTime() call site: 00000 /src/znc/src/Utils.cpp:404
0 0 None 2 2 CString::CaseCmp(CStringconst&,unsignedlong)const call site: 00000 /src/znc/src/ZNCString.cpp:122

Runtime coverage analysis

Covered functions
42
Functions that are reachable but not covered
241
Reachable functions
306
Percentage of reachable functions covered
21.24%
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/msg_parse_fuzzer.cpp 1
/src/znc/include/znc/ZNCString.h 6
/src/znc/src/Message.cpp 7
/src/znc/src/Nick.cpp 3
/src/znc/third_party/bpstd/bpstd/string_view.hpp 5
/usr/local/bin/../include/c++/v1/stdexcept 1
/src/znc/src/ZNCString.cpp 13
/usr/include/ctype.h 5
/src/znc/src/Utils.cpp 2
/src/znc/third_party/cctz/src/time_zone_lookup.cc 4
/src/znc/third_party/cctz/src/time_zone_impl.cc 3
/src/znc/third_party/cctz/src/time_zone_if.cc 1
/src/znc/third_party/cctz/src/time_zone_libc.cc 1
/src/znc/third_party/cctz/src/time_zone_if.h 2
/src/znc/third_party/cctz/src/time_zone_info.h 3
/src/znc/third_party/cctz/src/time_zone_info.cc 16
/src/znc/third_party/cctz/src/time_zone_fixed.cc 5
/src/znc/third_party/cctz/include/cctz/civil_time_detail.h 37
/src/znc/third_party/cctz/src/time_zone_posix.h 2
/src/znc/third_party/cctz/src/time_zone_posix.cc 5
/src/znc/third_party/cctz/include/cctz/time_zone.h 3
/src/znc/third_party/cctz/src/time_zone_format.cc 9
/src/znc/third_party/cctz/src/time_zone_impl.h 2
/src/znc/include/znc/Message.h 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
CClient::ReadLine(CStringconst&) /src/znc/src/Client.cpp 2 ['class.CClient *', 'class.CString *'] 32 0 1138 249 209 1638 0 15371 14258
CWebSock::OnPageRequest(CStringconst&) /src/znc/src/WebModules.cpp 2 ['class.CWebSock *', 'class.CString *'] 12 0 65 13 9 499 0 4793 4129
CZNC::Loop() /src/znc/src/znc.cpp 1 ['class.CZNC *'] 31 0 314 72 55 1440 0 8042 3270
CIRCSock::ReadLine(CStringconst&) /src/znc/src/IRCSock.cpp 2 ['class.CIRCSock *', 'class.CString *'] 27 0 837 178 130 1242 0 6427 3000
CZNC::ParseConfig(CStringconst&,CString&) /src/znc/src/znc.cpp 3 ['class.CZNC *', 'class.CString *', 'class.CString *'] 32 0 76 17 17 1304 0 8493 1561
CZNC::WriteNewConfig(CStringconst&) /src/znc/src/znc.cpp 2 ['class.CZNC *', 'class.CString *'] 11 0 4904 998 706 361 0 2014 1016
CHTTPSock::ReadLine(CStringconst&) /src/znc/src/HTTPSock.cpp 2 ['class.CHTTPSock *', 'class.CString *'] 10 0 1501 298 235 127 0 908 362

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

Functions statically reachable by fuzzers
55.0%
1249 / 2266
Cyclomatic complexity statically reachable by fuzzers
80.0%
28555 / 35850

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
[] []
/usr/include/x86_64-linux-gnu/bits/byteswap.h [] []
/src/znc/build/include/znc/Csocket.h [] []
/src/znc/third_party/cctz/src/time_zone_info.h ['msg_parse_fuzzer'] []
/src/znc/src/Server.cpp [] []
/src/znc/src/FileUtils.cpp [] []
/src/znc/src/ZNCString.cpp ['msg_parse_fuzzer'] ['msg_parse_fuzzer']
/src/znc/src/Threads.cpp [] []
/src/znc/src/Template.cpp [] []
/src/znc/include/znc/Nick.h [] []
/src/znc/include/znc/Client.h [] []
/src/znc/third_party/cctz/include/cctz/zone_info_source.h [] []
/src/znc/third_party/cctz/src/time_zone_impl.h ['msg_parse_fuzzer'] []
/src/znc/include/znc/znc.h [] []
/src/znc/src/znc.cpp [] []
/src/znc/src/IRCSock.cpp [] []
/src/znc/include/znc/Template.h [] []
/src/znc/src/WebModules.cpp [] []
/src/znc/src/ClientCommand.cpp [] []
/src/znc/include/znc/Query.h [] []
/src/znc/third_party/cctz/src/time_zone_info.cc ['msg_parse_fuzzer'] []
/usr/local/bin/../include/c++/v1/math.h [] []
/src/znc/include/znc/Socket.h [] []
/usr/local/bin/../include/c++/v1/istream [] []
/src/znc/third_party/cctz/src/time_zone_libc.cc ['msg_parse_fuzzer'] []
/src/znc/third_party/cctz/src/time_zone_format.cc ['msg_parse_fuzzer'] []
/src/znc/include/znc/IRCSock.h [] []
/src/znc/include/znc/WebModules.h [] []
/src/znc/include/znc/Threads.h [] []
/src/znc/third_party/cctz/src/zone_info_source.cc [] []
/src/znc/third_party/cctz/src/time_zone_impl.cc ['msg_parse_fuzzer'] []
/src/znc/third_party/cctz/src/time_zone_if.h ['msg_parse_fuzzer'] []
/src/znc/include/znc/Listener.h [] []
/src/znc/src/Translation.cpp [] []
/src/znc/third_party/cctz/src/time_zone_posix.cc ['msg_parse_fuzzer'] []
/src/znc/src/Listener.cpp [] []
/src/znc/src/IRCNetwork.cpp [] []
/src/znc/src/Message.cpp ['msg_parse_fuzzer'] ['msg_parse_fuzzer']
/src/znc/src/Query.cpp [] []
/src/znc/include/znc/ZNCDebug.h [] []
/usr/local/bin/../include/c++/v1/exception [] []
/src/znc/src/User.cpp [] []
/src/znc/src/Client.cpp [] []
/usr/local/bin/../include/c++/v1/stdexcept ['msg_parse_fuzzer'] []
/src/znc/src/Utils.cpp ['msg_parse_fuzzer'] ['msg_parse_fuzzer']
/src/znc/src/SHA256.cpp [] []
/src/znc/src/Chan.cpp [] []
/src/znc/include/znc/Utils.h [] []
/src/znc/src/Modules.cpp [] []
/src/znc/include/znc/Buffer.h [] []
/src/msg_parse_fuzzer.cpp ['msg_parse_fuzzer'] ['msg_parse_fuzzer']
/src/znc/src/Nick.cpp ['msg_parse_fuzzer'] ['msg_parse_fuzzer']
/src/znc/include/znc/IRCNetwork.h [] []
/src/znc/src/MD5.cpp [] []
/src/znc/third_party/cctz/src/time_zone_libc.h [] []
/usr/local/bin/../include/c++/v1/iosfwd [] []
/src/znc/src/Config.cpp [] []
/src/znc/include/znc/User.h [] []
/usr/include/stdlib.h [] []
/src/znc/src/HTTPSock.cpp [] []
/src/znc/include/znc/Chan.h [] []
/src/znc/src/Buffer.cpp [] []
/src/znc/src/ZNCDebug.cpp [] []
/src/znc/third_party/cctz/include/cctz/time_zone.h ['msg_parse_fuzzer'] []
/usr/include/ctype.h ['msg_parse_fuzzer'] []
/src/znc/third_party/cctz/src/time_zone_if.cc ['msg_parse_fuzzer'] []
/src/znc/include/znc/Config.h [] []
/src/znc/include/znc/HTTPSock.h [] []
/usr/include/x86_64-linux-gnu/sys/stat.h [] []
/src/znc/third_party/cctz/include/cctz/civil_time_detail.h ['msg_parse_fuzzer'] []
/src/znc/build/src/Csocket.cpp [] []
/src/znc/third_party/cctz/src/time_zone_lookup.cc ['msg_parse_fuzzer'] []
/src/znc/third_party/cctz/src/time_zone_posix.h ['msg_parse_fuzzer'] []
/src/znc/include/znc/Translation.h [] []
/src/znc/include/znc/MD5.h [] []
/src/znc/include/znc/Message.h ['msg_parse_fuzzer'] ['msg_parse_fuzzer']
/src/znc/include/znc/Modules.h [] []
/src/znc/include/znc/FileUtils.h [] []
/src/znc/src/Socket.cpp [] []
/src/znc/third_party/cctz/src/time_zone_fixed.cc ['msg_parse_fuzzer'] []
/src/znc/include/znc/ZNCString.h ['msg_parse_fuzzer'] ['msg_parse_fuzzer']
/src/znc/third_party/bpstd/bpstd/string_view.hpp ['msg_parse_fuzzer'] ['msg_parse_fuzzer']

Directories in report

Directory
/usr/include/
/src/znc/third_party/bpstd/bpstd/
/src/znc/include/znc/
/usr/local/bin/../include/c++/v1/
/usr/include/x86_64-linux-gnu/bits/
/usr/include/x86_64-linux-gnu/sys/
/src/znc/build/include/znc/
/src/znc/third_party/cctz/src/
/src/znc/src/
/src/znc/build/src/
/src/znc/third_party/cctz/include/cctz/
/src/