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: ZydisFuzzReEncoding

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 140 17.8%
gold [1:9] 50 6.36%
yellow [10:29] 79 10.0%
greenyellow [30:49] 16 2.03%
lawngreen 50+ 501 63.7%
All colors 786 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
22 42 3 :

['abort', 'fputs', 'ZydisCalcAbsoluteAddress']

22 42 ZydisValidateInstructionIdentity call site: 00740 /src/zydis/build/../tools/ZydisFuzzShared.c:261
4 4 2 :

['abort', 'fputs']

4 4 ZydisReEncodeInstruction call site: 00740 /src/zydis/build/../tools/ZydisFuzzShared.c:511
2 2 1 :

['fputs']

2 2 ZydisFuzzerInit call site: 00000 /src/zydis/build/../tools/ZydisFuzzShared.c:528
0 0 None 18 38 ZydisValidateInstructionIdentity call site: 00752 /src/zydis/build/../tools/ZydisFuzzShared.c:332
0 0 None 18 38 ZydisValidateInstructionIdentity call site: 00756 /src/zydis/build/../tools/ZydisFuzzShared.c:353
0 0 None 4 4 ZydisValidateInstructionIdentity call site: 00740 /src/zydis/build/../tools/ZydisFuzzShared.c:273
0 0 None 4 4 ZydisValidateInstructionIdentity call site: 00746 /src/zydis/build/../tools/ZydisFuzzShared.c:313
0 0 None 4 4 ZydisReEncodeInstruction call site: 00464 /src/zydis/build/../tools/ZydisFuzzShared.c:482
0 0 None 4 4 ZydisReEncodeInstruction call site: 00468 /src/zydis/build/../tools/ZydisFuzzShared.c:491
0 0 None 4 4 ZydisReEncodeInstruction call site: 00736 /src/zydis/build/../tools/ZydisFuzzShared.c:501
0 0 None 4 4 ZydisReEncodeInstructionAbsolute call site: 00764 /src/zydis/build/../tools/ZydisFuzzShared.c:443
0 0 None 4 4 ZydisReEncodeInstructionAbsolute call site: 00767 /src/zydis/build/../tools/ZydisFuzzShared.c:459

Runtime coverage analysis

Covered functions
132
Functions that are reachable but not covered
6
Reachable functions
134
Percentage of reachable functions covered
95.52%
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
build/../tools/ZydisFuzzShared.c 7
build/../tools/ZydisFuzzReEncoding.c 1
src/Decoder.c 51
src/DecoderData.c 2
src/SharedData.c 4
src/Register.c 5
src/Encoder.c 56
src/EncoderData.c 1
src/Utils.c 1
src/Generated/GetRelInfo.inc 1

Fuzzer: ZydisFuzzEncoder

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 166 20.3%
gold [1:9] 39 4.79%
yellow [10:29] 93 11.4%
greenyellow [30:49] 38 4.66%
lawngreen 50+ 478 58.7%
All colors 814 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
4 4 2 :

['abort', 'fputs']

4 4 ZydisReEncodeInstruction call site: 00770 /src/zydis/build/../tools/ZydisFuzzShared.c:511
2 2 1 :

['fputs']

2 2 ZydisFuzzerInit call site: 00000 /src/zydis/build/../tools/ZydisFuzzShared.c:528
0 0 None 18 38 ZydisValidateInstructionIdentity call site: 00780 /src/zydis/build/../tools/ZydisFuzzShared.c:332
0 0 None 18 38 ZydisValidateInstructionIdentity call site: 00784 /src/zydis/build/../tools/ZydisFuzzShared.c:353
0 0 None 12 22 ZydisCompareRequestToInstruction call site: 00668 /src/zydis/build/../tools/ZydisFuzzEncoder.c:99
0 0 None 12 22 ZydisCompareRequestToInstruction call site: 00674 /src/zydis/build/../tools/ZydisFuzzEncoder.c:127
0 0 None 12 22 ZydisCompareRequestToInstruction call site: 00679 /src/zydis/build/../tools/ZydisFuzzEncoder.c:171
0 0 None 4 4 ZydisCompareRequestToInstruction call site: 00660 /src/zydis/build/../tools/ZydisFuzzEncoder.c:69
0 0 None 4 4 ZydisCompareRequestToInstruction call site: 00663 /src/zydis/build/../tools/ZydisFuzzEncoder.c:74
0 0 None 4 4 ZydisCompareRequestToInstruction call site: 00666 /src/zydis/build/../tools/ZydisFuzzEncoder.c:79
0 0 None 4 4 ZydisValidateInstructionIdentity call site: 00770 /src/zydis/build/../tools/ZydisFuzzShared.c:273
0 0 None 4 4 ZydisValidateInstructionIdentity call site: 00774 /src/zydis/build/../tools/ZydisFuzzShared.c:313

Runtime coverage analysis

Covered functions
134
Functions that are reachable but not covered
6
Reachable functions
136
Percentage of reachable functions covered
95.59%
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
build/../tools/ZydisFuzzShared.c 7
build/../tools/ZydisFuzzEncoder.c 2
src/Encoder.c 56
src/EncoderData.c 1
src/SharedData.c 4
src/Register.c 5
src/Decoder.c 52
src/DecoderData.c 2
src/Utils.c 1
src/Generated/GetRelInfo.inc 1

Fuzzer: ZydisFuzzDecoder

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 68 13.7%
gold [1:9] 64 12.9%
yellow [10:29] 38 7.69%
greenyellow [30:49] 11 2.22%
lawngreen 50+ 313 63.3%
All colors 494 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
2 2 1 :

['fputs']

2 2 ZydisFuzzerInit call site: 00000 /src/zydis/build/../tools/ZydisFuzzShared.c:528
0 7 1 :

['ZydisFormatterBufferAppendPredefined']

0 82 ZydisFormatterATTPrintMnemonic call site: 00000 /src/zydis/src/FormatterATT.c:285
0 0 None 12 40 ZydisFormatterATTFormatInstruction call site: 00000 /src/zydis/src/FormatterATT.c:85
0 0 None 12 40 ZydisFormatterATTFormatInstruction call site: 00000 /src/zydis/src/FormatterATT.c:116
0 0 None 12 40 ZydisFormatterATTFormatInstruction call site: 00000 /src/zydis/src/FormatterATT.c:126
0 0 None 12 12 ZydisFormatterIntelFormatInstruction call site: 00000 /src/zydis/src/FormatterIntel.c:85
0 0 None 12 12 ZydisFormatterIntelFormatInstruction call site: 00000 /src/zydis/src/FormatterIntel.c:116
0 0 None 12 12 ZydisFormatterIntelFormatInstruction call site: 00000 /src/zydis/src/FormatterIntel.c:126
0 0 None 0 817 ZydisDecoderDecodeInstruction call site: 00008 /src/zydis/src/Decoder.c:5031
0 0 None 0 45 ZydisFormatterBasePrintPrefixes call site: 00000 /src/zydis/src/FormatterBase.c:505
0 0 None 0 45 ZydisFormatterBasePrintPrefixes call site: 00000 /src/zydis/src/FormatterBase.c:520
0 0 None 0 0 ZydisDecodeInstruction call site: 00157 /src/zydis/src/Decoder.c:4816

Runtime coverage analysis

Covered functions
126
Functions that are reachable but not covered
5
Reachable functions
90
Percentage of reachable functions covered
94.44%
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
build/../tools/ZydisFuzzShared.c 4
build/../tools/ZydisFuzzDecoder.c 1
src/Decoder.c 52
src/Formatter.c 8
src/DecoderData.c 2
src/SharedData.c 4
src/Register.c 8
src/FormatterBuffer.c 2
src/Utils.c 1
src/Mnemonic.c 2
src/Segment.c 1
src/Zydis.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
ZydisFormatterBasePrintPrefixes /src/zydis/src/FormatterBase.c 3 ['N/A', 'N/A', 'N/A'] 3 0 1032 226 92 8 0 209 207
ZydisFormatterBasePrintDecorator /src/zydis/src/FormatterBase.c 4 ['N/A', 'N/A', 'N/A', 'int'] 2 0 1356 289 110 4 0 195 110
ZydisFormatterIntelFormatOperandMEM /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 3 0 500 106 44 7 0 80 57
ZydisFormatterIntelFormatInstructionMASM /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 3 0 41 9 2 5 0 65 53
ZydisFormatterATTFormatInstruction /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 2 0 599 123 47 4 0 63 47
ZydisFormatterIntelPrintTypecast /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 2 0 326 75 28 4 0 55 43
ZydisFormatterATTFormatOperandMEM /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 3 0 476 102 42 7 0 78 42
ZydisFormatterATTPrintIMM /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 4 0 69 17 5 13 0 93 36

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

Functions statically reachable by fuzzers
88.0%
171 / 195
Cyclomatic complexity statically reachable by fuzzers
94.0%
2738 / 2903

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.

build/../tools/ZydisFuzzShared.c

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=['ZydisValidateInstructionIdentity', 'ZydisReEncodeInstruction', 'ZydisSetAVXInformation', 'ZydisNodeHandlerRexB', 'ZydisSetOperandSizeAndElementInfo', 'ZydisNodeHandlerOpcode', 'ZydisDecodeOptionalInstructionParts', 'ZydisSetAttributes', 'ZydisDecodeOperands']

build/../tools/ZydisFuzzShared.c

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=['ZydisCompareRequestToInstruction', 'ZydisValidateInstructionIdentity', 'ZydisSetAVXInformation', 'ZydisReEncodeInstruction', 'ZydisNodeHandlerRexB', 'ZydisSetOperandSizeAndElementInfo', 'ZydisIsBroadcastModeCompatible', 'ZydisIsMemoryOperandCompatible', 'ZydisGetEffectiveImmSize', 'ZydisIsImmediateOperandCompabile']

build/../tools/ZydisFuzzShared.c

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=['ZydisSetAVXInformation', 'ZydisNodeHandlerRexB', 'ZydisSetOperandSizeAndElementInfo', 'ZydisNodeHandlerOpcode', 'ZydisDecodeOptionalInstructionParts', 'ZydisSetAttributes', 'ZydisDecodeOperands', 'ZydisDecodeOperandImplicitMemory', 'ZydisValidateEnumRanges', 'ZydisNodeHandlerXOP']

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/zydis/src/Encoder.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder']
/src/zydis/src/Decoder.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/src/DecoderData.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/include/Zydis/Internal/String.h [] []
/src/zydis/src/FormatterBase.c [] []
/src/zydis/build/../tools/ZydisFuzzShared.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] []
/src/zydis/src/String.c [] []
/src/zydis/src/Generated/GetRelInfo.inc ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder']
/src/zydis/src/Formatter.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/src/Zydis.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/src/Utils.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/include/Zydis/Internal/FormatterBase.h [] []
/src/zydis/src/FormatterBuffer.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/src/Mnemonic.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/build/../tools/ZydisFuzzDecoder.c ['ZydisFuzzDecoder'] []
/src/zydis/src/SharedData.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/src/EncoderData.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder']
/src/zydis/src/Segment.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/build/../tools/ZydisFuzzReEncoding.c ['ZydisFuzzReEncoding'] []
/src/zydis/src/Register.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/dependencies/zycore/include/Zycore/Format.h [] []
/src/zydis/build/../tools/ZydisFuzzEncoder.c ['ZydisFuzzEncoder'] []
/src/zydis/src/FormatterIntel.c [] []
/src/zydis/src/FormatterATT.c [] []

Directories in report

Directory
/src/zydis/src/
/src/zydis/dependencies/zycore/include/Zycore/
/src/zydis/src/Generated/
/src/zydis/build/../tools/
/src/zydis/include/Zydis/Internal/