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: ssh2_client_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 211 37.8%
gold [1:9] 7 1.25%
yellow [10:29] 13 2.32%
greenyellow [30:49] 5 0.89%
lawngreen 50+ 322 57.7%
All colors 558 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 511 session_free call site: 00511 ssh2_channel_free
19 392 packet_queue_listener call site: 00392 ssh2_transport_send
16 329 ssh2_packet_add call site: 00329 ssh2_channel_receive_window_adjust
14 533 session_free call site: 00533 ssh2_channel_forward_cancel
12 433 packet_x11_open call site: 00433 ssh2_transport_send
12 462 packet_authagent_open call site: 00462 ssh2_transport_send
7 214 ssh2_kex_agree_instr call site: 00214 kex_agree_hostkey
6 137 ssh2_transport_send call site: 00137 ssh2_kex_exchange
6 166 ssh2_transport_send call site: 00166 ssh2_err
5 130 ssh2_transport_send call site: 00130 snprintf
5 363 ssh2_packet_add call site: 00363 ssh2_err
4 16 ssh2_now call site: 00016 time

Runtime coverage analysis

Covered functions
132
Functions that are reachable but not covered
32
Reachable functions
100
Percentage of reachable functions covered
68.0%
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/libssh2/tests/ossfuzz/ssh2_client_fuzzer.cc 1
global.c 3
openssl.c 2
session.c 15
misc.c 20
kex.c 12
hostkey.c 1
crypt.c 1
mac.c 2
comp.c 1
transport.c 6
packet.c 6
keepalive.c 1
channel.c 7

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
ssh2_pub_privkey /src/libssh2/src/openssl.c 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'size_t', 'N/A'] 8 0 169 22 6 118 0 638 555
kex_method_diffie_hellman_group_exchange_sha256_key_exchange /src/libssh2/src/kex.c 2 ['N/A', 'N/A'] 28 0 366 56 22 114 0 1029 195
kex_method_curve25519_key_exchange /src/libssh2/src/kex.c 2 ['N/A', 'N/A'] 33 0 280 39 15 116 0 1011 104
kex_method_ecdh_key_exchange /src/libssh2/src/kex.c 2 ['N/A', 'N/A'] 33 0 293 38 15 117 0 1011 86
libssh2_channel_read_ex /src/libssh2/src/channel.c 4 ['N/A', 'int', 'N/A', 'size_t'] 29 0 179 37 12 75 0 839 55
libssh2_poll /src/libssh2/src/session.c 3 ['N/A', 'int', 'size_t'] 11 0 958 128 36 77 0 837 51
libssh2_channel_direct_streamlocal_ex /src/libssh2/src/channel.c 4 ['N/A', 'N/A', 'N/A', 'int'] 29 0 101 22 8 78 0 836 48
hostkey_method_ssh_ecdsa_init /src/libssh2/src/hostkey.c 4 ['N/A', 'N/A', 'size_t', 'N/A'] 3 0 349 80 32 23 0 108 37
crypt_encrypt_chacha20_poly_buffer /src/libssh2/src/crypt.c 6 ['N/A', 'int', 'N/A', 'size_t', 'N/A', 'int'] 2 0 134 18 7 6 0 35 35

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

Functions statically reachable by fuzzers
52.0%
167 / 322
Cyclomatic complexity statically reachable by fuzzers
67.0%
2003 / 2977

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/libssh2/src/misc.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/global.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/mac.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/keepalive.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/comp.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/transport.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/crypt.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/poly1305.c [] []
/src/libssh2/src/cipher-chachapoly.c [] []
/src/libssh2/src/pem.c [] []
/src/libssh2/src/openssl.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/kex.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/./blowfish.c [] []
/src/libssh2/tests/ossfuzz/ssh2_client_fuzzer.cc ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/packet.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/hostkey.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/chacha.c [] []
/src/libssh2/src/channel.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/session.c ['ssh2_client_fuzzer'] ['ssh2_client_fuzzer']
/src/libssh2/src/bcrypt_pbkdf.c [] []

Directories in report

Directory
/src/libssh2/src/
/src/libssh2/tests/ossfuzz/
/src/libssh2/src/./