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 58 23.2%
gold [1:9] 2 0.80%
yellow [10:29] 1 0.40%
greenyellow [30:49] 1 0.40%
lawngreen 50+ 187 75.1%
All colors 249 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
221 221 1 :

['srtp_unprotect_aead']

221 221 srtp_unprotect call site: 00000 /src/libsrtp/srtp/srtp.c:2603
175 175 1 :

['srtp_crypto_kernel_status']

175 175 srtp_crypto_kernel_init call site: 00000 /src/libsrtp/crypto/kernel/crypto_kernel.c:78
175 175 1 :

['srtp_unprotect_rtcp_aead']

175 175 srtp_unprotect_rtcp call site: 00000 /src/libsrtp/srtp/srtp.c:4291
154 154 1 :

['srtp_protect_aead']

154 154 srtp_protect call site: 00000 /src/libsrtp/srtp/srtp.c:2291
71 71 1 :

['srtp_protect_rtcp_aead']

71 71 srtp_protect_rtcp call site: 00000 /src/libsrtp/srtp/srtp.c:4054
2 2 1 :

['srtp_inject_mki']

88 230 srtp_protect call site: 00000 /src/libsrtp/srtp/srtp.c:2344
2 2 1 :

['srtp_inject_mki']

73 100 srtp_protect_rtcp call site: 00000 /src/libsrtp/srtp/srtp.c:4094
2 2 1 :

['abort']

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

['abort']

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

['srtp_stream_dealloc']

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

['srtp_crypto_alloc']

354 730 srtp_stream_init_keys call site: 00112 /src/libsrtp/srtp/srtp.c:1054
0 25 1 :

['srtp_rdbx_dealloc']

0 25 srtp_stream_init call site: 00110 /src/libsrtp/srtp/srtp.c:1497

Runtime coverage analysis

Covered functions
174
Functions that are reachable but not covered
15
Reachable functions
83
Percentage of reachable functions covered
81.93%
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 26
crypto/kernel/alloc.c 2
crypto/kernel/err.c 1
crypto/math/datatypes.c 6
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
fuzz_srtp_unprotect /src/libsrtp/fuzzer/fuzzer.c 4 ['N/A', 'N/A', 'N/A', 'size_t'] 10 0 30 3 2 61 0 331 220
LLVMFuzzerInitialize /src/libsrtp/fuzzer/fuzzer.c 2 ['N/A', 'N/A'] 8 0 144 25 7 42 0 261 194
fuzz_srtp_protect /src/libsrtp/fuzzer/fuzzer.c 4 ['N/A', 'N/A', 'N/A', 'size_t'] 9 0 43 3 2 60 0 318 84
fuzz_srtp_unprotect_rtcp /src/libsrtp/fuzzer/fuzzer.c 4 ['N/A', 'N/A', 'N/A', 'size_t'] 10 0 30 3 2 45 0 243 80
fuzz_srtp_protect_rtcp /src/libsrtp/fuzzer/fuzzer.c 4 ['N/A', 'N/A', 'N/A', 'size_t'] 9 0 43 3 2 43 0 213 56
srtp_hmac_compute /src/libsrtp/crypto/hash/hmac.c 5 ['N/A', 'N/A', 'size_t', 'size_t', 'N/A'] 5 0 128 16 6 14 0 70 47
srtp_update /src/libsrtp/srtp/srtp.c 2 ['N/A', 'N/A'] 11 0 72 13 6 62 0 363 37

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

Functions statically reachable by fuzzers
66.0%
153 / 231
Cyclomatic complexity statically reachable by fuzzers
79.0%
1118 / 1410

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

Directories in report

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