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

Fuzzer details

Fuzzer: srtp-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 55 22.3%
gold [1:9] 1 0.40%
yellow [10:29] 2 0.81%
greenyellow [30:49] 1 0.40%
lawngreen 50+ 187 76.0%
All colors 246 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
210 210 1 :

['srtp_unprotect_aead']

210 210 srtp_unprotect_mki call site: 00000 /src/libsrtp/srtp/srtp.c:2585
187 187 1 :

['srtp_crypto_kernel_status']

187 187 srtp_crypto_kernel_init call site: 00000 /src/libsrtp/crypto/kernel/crypto_kernel.c:77
171 171 1 :

['srtp_unprotect_rtcp_aead']

171 171 srtp_unprotect_rtcp_mki call site: 00000 /src/libsrtp/srtp/srtp.c:4310
154 154 1 :

['srtp_protect_aead']

154 154 srtp_protect_mki call site: 00000 /src/libsrtp/srtp/srtp.c:2241
76 76 1 :

['srtp_protect_rtcp_aead']

76 76 srtp_protect_rtcp_mki call site: 00000 /src/libsrtp/srtp/srtp.c:4074
23 29 3 :

['srtp_err_report', 'srtp_cipher_output', 'srtp_octet_string_hex_string']

25 215 srtp_unprotect_rtcp_mki call site: 00000 /src/libsrtp/srtp/srtp.c:4424
2 2 1 :

['abort']

2 2 LLVMFuzzerInitialize call site: 00000 /src/libsrtp/fuzzer/fuzzer.c:775
2 2 1 :

['abort']

2 2 extract_policy call site: 00012 /src/libsrtp/fuzzer/fuzzer.c:442
0 63 1 :

['srtp_stream_dealloc']

0 63 srtp_stream_clone call site: 00000 /src/libsrtp/srtp/srtp.c:573
0 25 1 :

['srtp_rdbx_dealloc']

0 25 srtp_stream_init call site: 00110 /src/libsrtp/srtp/srtp.c:1367
0 21 2 :

['srtp_kdf_init', 'srtp_cipher_get_key_length']

189 430 srtp_stream_init_keys call site: 00145 /src/libsrtp/srtp/srtp.c:1087
0 20 1 :

['srtp_crypto_free']

0 20 srtp_aes_icm_alloc call site: 00000 /src/libsrtp/crypto/cipher/aes_icm.c:124

Runtime coverage analysis

Covered functions
183
Functions that are reachable but not covered
15
Reachable functions
84
Percentage of reachable functions covered
82.14%
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
fuzzer/fuzzer.c 15
fuzzer/mt19937.cpp 3
srtp/srtp.c 27
crypto/kernel/alloc.c 2
crypto/kernel/err.c 1
crypto/math/datatypes.c 7
crypto/cipher/cipher.c 5
crypto/replay/rdbx.c 4
crypto/kernel/crypto_kernel.c 4
crypto/replay/rdb.c 1
crypto/kernel/key.c 1
crypto/hash/auth.c 1
fuzzer/testmem.c 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
LLVMFuzzerInitialize /src/libsrtp/fuzzer/fuzzer.c 2 ['int *', 'char ***'] 7 0 144 25 7 43 0 273 217
fuzz_srtp_unprotect /src/libsrtp/fuzzer/fuzzer.c 5 ['struct.srtp_ctx_t_ *', 'char *', 'int *', 'char ', 'int '] 10 0 30 3 2 59 0 321 202
fuzz_srtp_protect /src/libsrtp/fuzzer/fuzzer.c 5 ['struct.srtp_ctx_t_ *', 'char *', 'int *', 'char ', 'int '] 9 0 30 3 2 59 0 317 86
fuzz_srtp_unprotect_rtcp /src/libsrtp/fuzzer/fuzzer.c 5 ['struct.srtp_ctx_t_ *', 'char *', 'int *', 'char ', 'int '] 10 0 30 3 2 46 0 241 81
fuzz_srtp_protect_rtcp /src/libsrtp/fuzzer/fuzzer.c 5 ['struct.srtp_ctx_t_ *', 'char *', 'int *', 'char ', 'int '] 9 0 30 3 2 45 0 213 52
srtp_hmac_compute /src/libsrtp/crypto/hash/hmac.c 5 ['char *', 'char *', 'int ', 'int ', 'char *'] 3 0 138 16 6 14 0 70 47
srtp_update /src/libsrtp/srtp/srtp.c 2 ['struct.srtp_ctx_t_ *', 'struct.srtp_policy_t *'] 6 0 89 18 8 62 0 350 35

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

Functions statically reachable by fuzzers
63.7%
155/243
Cyclomatic complexity statically reachable by fuzzers
78.0%
1108 / 1420

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
[] []
/src/libsrtp/fuzzer/fuzzer.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/cipher/cipher.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/srtp/srtp.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/hash/sha1.c [] []
/src/libsrtp/crypto/kernel/key.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/cipher/aes.c [] []
/src/libsrtp/crypto/kernel/alloc.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/replay/rdbx.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/hash/hmac.c [] []
/src/libsrtp/crypto/hash/null_auth.c [] []
/src/libsrtp/crypto/kernel/crypto_kernel.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/fuzzer/mt19937.cpp ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/fuzzer/testmem.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/replay/rdb.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/kernel/err.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/hash/auth.c ['srtp-fuzzer'] ['srtp-fuzzer']
/src/libsrtp/crypto/cipher/null_cipher.c [] []
/src/libsrtp/crypto/math/datatypes.c ['srtp-fuzzer'] ['srtp-fuzzer']
/usr/include/x86_64-linux-gnu/bits/byteswap.h [] []
/src/libsrtp/crypto/cipher/aes_icm.c [] []

Directories in report

Directory
/src/libsrtp/crypto/kernel/
/src/libsrtp/crypto/math/
/src/libsrtp/crypto/cipher/
/src/libsrtp/crypto/hash/
/src/libsrtp/srtp/
/src/libsrtp/fuzzer/
/usr/include/x86_64-linux-gnu/bits/
/src/libsrtp/crypto/replay/