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_encoder

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 17 50.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 17 50.0%
All colors 34 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
8 5 ...fuzz_encoder.TestInput call site: 00005 .isinstance
6 21 ...fuzz_encoder.TestInput call site: 00021 redis._parsers.encoders.Encoder.decode
3 29 ...fuzz_encoder.TestInput call site: 00029 redis._parsers.encoders.Encoder.decode

Runtime coverage analysis

Covered functions
42
Functions that are reachable but not covered
16
Reachable functions
16
Percentage of reachable functions covered
0.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
/ 1
...fuzz_encoder 9
redis._parsers.encoders 6

Fuzzer: fuzz_util

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 11 33.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 22 66.6%
All colors 33 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
4 3 ...fuzz_util.TestInput call site: 00003 redis.utils.str_if_bytes
2 17 ...fuzz_util.TestInput call site: 00017 fdp.ConsumeString
2 21 ...fuzz_util.TestInput call site: 00021 fdp.ConsumeString
2 27 redis.utils.merge_result call site: 00027 result.add
1 25 ...fuzz_util.TestInput call site: 00025 .set

Runtime coverage analysis

Covered functions
42
Functions that are reachable but not covered
19
Reachable functions
19
Percentage of reachable functions covered
0.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
/ 1
...fuzz_util 10
redis.utils 8

Fuzzer: fuzz_func

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 53 71.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 21 28.3%
All colors 74 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
31 42 redis.client.CaseInsensitiveDict.__init__ call site: 00042 redis.client.CaseInsensitiveDict.update
17 24 ...fuzz_func.TestInput call site: 00024 redis.client.CaseInsensitiveDict.__init__
3 20 ...fuzz_func.TestInput call site: 00020 fdp.ConsumeFloat
2 7 ...fuzz_func.TestInput call site: 00007 fdp.ConsumeString

Runtime coverage analysis

Covered functions
41
Functions that are reachable but not covered
16
Reachable functions
16
Percentage of reachable functions covered
0.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
/ 1
...fuzz_func 12
redis.client 4

Fuzzer: fuzz_helper

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 51 69.8%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 22 30.1%
All colors 73 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
15 57 redis.commands.helpers.decode_dict_keys call site: 00057 redis.commands.helpers.nativestr
12 32 ...fuzz_helper.TestInput call site: 00032 redis.commands.helpers.parse_to_list
10 46 redis.commands.helpers.parse_to_list call site: 00046 redis.commands.helpers.decode_dict_keys
6 16 ...fuzz_helper.TestInput call site: 00016 redis.commands.helpers.list_or_args
5 23 redis.commands.helpers.list_or_args call site: 00023 redis.commands.helpers.list_or_args
3 6 ...fuzz_helper.TestInput call site: 00006 fdp.ConsumeString

Runtime coverage analysis

Covered functions
41
Functions that are reachable but not covered
29
Reachable functions
29
Percentage of reachable functions covered
0.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
/ 1
...fuzz_helper 13
redis.commands.helpers 16

Fuzzer: fuzz_backoff

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 20 45.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 24 54.5%
All colors 44 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
9 34 ...fuzz_backoff.TestInput call site: 00034 redis.backoff.DecorrelatedJitterBackoff.compute
4 10 ...fuzz_backoff.TestInput call site: 00010 redis.backoff.DecorrelatedJitterBackoff.reset
2 16 ...fuzz_backoff.TestInput call site: 00016 .min
2 23 ...fuzz_backoff.TestInput call site: 00023 .min
2 31 ...fuzz_backoff.TestInput call site: 00031 .min
1 7 ...fuzz_backoff.TestInput call site: 00007 .super

Runtime coverage analysis

Covered functions
42
Functions that are reachable but not covered
19
Reachable functions
19
Percentage of reachable functions covered
0.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
/ 1
...fuzz_backoff 14
redis.backoff 4

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
redis.cluster.RedisCluster._internal_execute_command redis.cluster 3 ['N/A', 'N/A', 'N/A'] 41 0 2 14 9 222 1 750 699
redis.commands.search.commands.SearchCommands.sugadd redis.commands.search.commands 4 ['N/A', 'N/A', 'N/A', 'N/A'] 22 0 5 2 4 80 0 268 208
redis.connection.SSLConnection._wrap_socket_with_ssl redis.connection 2 ['N/A', 'N/A'] 4 0 11 12 8 57 1 186 180
redis.commands.search.commands.SearchCommands.search redis.commands.search.commands 3 ['N/A', 'N/A', 'N/A'] 39 0 1 2 4 162 0 545 125
redis.asyncio.cluster.RedisCluster.execute_command redis.asyncio.cluster 3 ['N/A', 'N/A', 'N/A'] 6 0 3 15 9 86 0 293 123
redis.multidb.healthcheck.LagAwareHealthCheck.check_health redis.multidb.healthcheck 2 ['N/A', 'N/A'] 38 0 2 5 5 103 0 341 96
redis.client.PubSub.on_connect redis.client 2 ['N/A', 'N/A'] 40 0 7 3 4 200 0 668 91

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

Functions statically reachable by fuzzers
10.0%
246 / 2447
Cyclomatic complexity statically reachable by fuzzers
11.0%
927 / 8107

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/fuzz_encoder.py

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=['...fuzz_encoder.TestInput']

/src/fuzz_util.py

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=['...fuzz_util.TestInput', 'redis.utils.merge_result']

/src/fuzz_func.py

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=['redis.client.CaseInsensitiveDict.__init__', '...fuzz_func.TestInput']

/src/fuzz_helper.py

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=['redis.commands.helpers.decode_dict_keys', '...fuzz_helper.TestInput', 'redis.commands.helpers.parse_to_list', 'redis.commands.helpers.list_or_args']

/src/fuzz_backoff.py

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=['...fuzz_backoff.TestInput']

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
k.lower 126 32 25.39% ['fuzz_util', 'fuzz_func', 'fuzz_helper', 'fuzz_backoff', 'fuzz_encoder']
sentinel.sentinel_slaves 170 40 23.52% ['fuzz_encoder', 'fuzz_util']
re.findall 1987 452 22.74% ['fuzz_helper', 'fuzz_encoder', 'fuzz_util', 'fuzz_func']
n.to_string 703 167 23.75% ['fuzz_util', 'fuzz_func', 'fuzz_helper', 'fuzz_backoff', 'fuzz_encoder']
socket.gethostbyname 99 28 28.28% ['fuzz_helper', 'fuzz_encoder', 'fuzz_func']
token.split 83 38 45.78% ['fuzz_util', 'fuzz_func', 'fuzz_helper', 'fuzz_backoff', 'fuzz_encoder']
event.old_database.client.nodes_manager.nodes_cache.values 243 119 48.97% ['fuzz_util', 'fuzz_func', 'fuzz_helper', 'fuzz_backoff', 'fuzz_encoder']
redis._parsers.commands.CommandsParser.get_keys 33 0 0.0% []
redis._parsers.commands.CommandsParser.get_command_policies.extract_policies 60 3 5.0% ['fuzz_util', 'fuzz_func', 'fuzz_helper', 'fuzz_backoff', 'fuzz_encoder']
redis._parsers.commands.AsyncCommandsParser.get_keys 33 0 0.0% []
redis._parsers.commands.AsyncCommandsParser.get_command_policies.extract_policies 57 0 0.0% []
r.command 1051 217 20.64% ['fuzz_helper', 'fuzz_encoder']
client.nodes_manager.connection_kwargs.get 663 157 23.68% ['fuzz_encoder', 'fuzz_backoff']
f.redis_args 101 52 51.48% ['fuzz_util', 'fuzz_func', 'fuzz_helper', 'fuzz_backoff', 'fuzz_encoder']
client.pipeline 663 157 23.68% ['fuzz_func']

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
[] []
redis.asyncio.cluster [] []
redis.asyncio.multidb [] []
ipaddress [] []
redis.asyncio [] []
datetime [] []
redis.cluster [] []
importlib [] []
redis.commands.bf.info [] []
redis.connection [] []
zlib [] []
redis.asyncio.connection [] []
redis.commands.search.hybrid_query [] []
redis.multidb.database [] []
redis.auth.err [] []
redis.commands.timeseries [] []
...fuzz_backoff ['fuzz_backoff'] []
redis._parsers.encoders ['fuzz_encoder'] []
redis.commands.policies [] []
redis [] []
redis.background [] []
redis.multidb [] []
redis.event [] []
logging [] []
copy [] []
redis._parsers.hiredis [] []
redis.retry [] []
redis.multidb.command_executor [] []
redis.commands.search.reducers [] []
...fuzz_encoder ['fuzz_encoder'] []
redis.commands.timeseries.utils [] []
base64 [] []
redis.commands.search.result [] []
redis.typing [] []
redis.asyncio.multidb.healthcheck [] []
redis.commands.timeseries.commands [] []
binascii [] []
urllib [] []
json [] []
redis.commands.search.document [] []
redis.auth.idp [] []
redis.commands.bf.commands [] []
redis.commands.timeseries.info [] []
queue [] []
redis.sentinel [] []
redis.commands.search.aggregation [] []
redis.commands.json.commands [] []
redis.multidb.circuit [] []
dataclasses [] []
sys [] []
hashlib [] []
redis.asyncio.multidb.database [] []
redis.commands.search.querystring [] []
gzip [] []
inspect [] []
redis.http [] []
redis.multidb.healthcheck [] []
redis.asyncio.client [] []
redis.commands.vectorset.utils [] []
redis.commands.search.hybrid_result [] []
redis.asyncio.http.http_client [] []
hiredis [] []
redis.asyncio.multidb.failover [] []
redis.multidb.failover [] []
redis.commands.search.field [] []
typing [] []
redis._parsers.helpers [] []
redis.utils ['fuzz_util'] []
itertools [] []
ssl [] []
redis.auth [] []
...fuzz_util ['fuzz_util'] []
redis.asyncio.http [] []
redis._parsers.commands [] []
redis.commands.search.dialect [] []
random [] []
uuid [] []
collections [] []
redis.asyncio.utils [] []
jwt [] []
redis.data_structure [] []
redis.commands.cluster [] []
socket [] []
functools [] []
redis.cache [] []
[] []
redis.lock [] []
redis.asyncio.lock [] []
redis.commands.helpers ['fuzz_helper'] []
redis.commands.search.profile_information [] []
redis._parsers.socket [] []
redis.commands.json [] []
redis.credentials [] []
redis.commands.vectorset [] []
abc [] []
redis.asyncio.multidb.client [] []
redis.commands.search.query [] []
cryptography [] []
redis.multidb.exception [] []
types [] []
redis._parsers [] []
redis.commands.sentinel [] []
redis.multidb.event [] []
asyncio [] []
concurrent [] []
redis.crc [] []
redis.asyncio.multidb.command_executor [] []
time [] []
redis.commands.search.index_definition [] []
redis.asyncio.multidb.failure_detector [] []
os [] []
redis.commands.redismodules [] []
redis.multidb.client [] []
textwrap [] []
redis.maint_notifications [] []
redis.asyncio.retry [] []
redis.exceptions [] []
redis.commands.bf [] []
redis.asyncio.multidb.config [] []
redis.commands.search.suggestion [] []
...fuzz_func ['fuzz_func'] []
weakref [] []
re [] []
math [] []
atheris [] []
...fuzz_helper ['fuzz_helper'] []
redis._parsers.base [] []
threading [] []
redis._parsers.resp3 [] []
redis._parsers.resp2 [] []
redis.asyncio.sentinel [] []
redis.backoff ['fuzz_backoff'] []
io [] []
redis.http.http_client [] []
OpenSSL [] []
redis.asyncio.multidb.event [] []
redis.auth.token [] []
redis.commands.core [] []
redis.commands.json._util [] []
redis.client ['fuzz_func'] []
pybreaker [] []
redis.multidb.failure_detector [] []
redis.commands [] []
redis.commands.search._util [] []
redis.commands.json.path [] []
async_timeout [] []
redis.commands.search [] []
redis.multidb.config [] []
warnings [] []
redis.commands.vectorset.commands [] []
redis.commands.json.decoders [] []
redis.ocsp [] []
redis.commands.search.commands [] []
redis.auth.token_manager [] []
requests [] []

Directories in report

Directory