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 138 17.8%
gold [1:9] 50 6.45%
yellow [10:29] 67 8.64%
greenyellow [30:49] 18 2.32%
lawngreen 50+ 502 64.7%
All colors 775 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
12 738 ZydisValidateInstructionIdentity call site: 00738 fprintf
8 728 ZydisReEncodeInstruction call site: 00728 fputs
7 251 ZydisSetAVXInformation call site: 00251 __assert_fail
4 102 ZydisNodeHandlerRexB call site: 00102 __assert_fail
4 344 ZydisSetOperandSizeAndElementInfo call site: 00344 __assert_fail
3 144 ZydisDecodeOptionalInstructionParts call site: 00144 __assert_fail
3 194 ZydisSetAttributes call site: 00194 __assert_fail
3 296 ZydisDecodeOperands call site: 00296 ZydisDecodeOperandRegister
3 433 ZydisReEncodeInstruction call site: 00433 __assert_fail
3 462 ZydisIsBroadcastModeCompatible call site: 00462 __assert_fail
3 538 ZydisCheckVectorMemorySize call site: 00538 __assert_fail
3 584 ZydisGetEffectiveImmSize call site: 00584 __assert_fail

Runtime coverage analysis

Covered functions
144
Functions that are reachable but not covered
6
Reachable functions
147
Percentage of reachable functions covered
95.92%
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 58
src/DecoderData.c 2
src/SharedData.c 6
src/Register.c 5
src/Encoder.c 59
src/EncoderData.c 1
src/Generated/GetCcInfo.inc 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 162 20.1%
gold [1:9] 39 4.86%
yellow [10:29] 93 11.5%
greenyellow [30:49] 23 2.86%
lawngreen 50+ 485 60.4%
All colors 802 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 650 ZydisFuzzTarget call site: 00650 ZydisCalcAbsoluteAddress
12 765 ZydisValidateInstructionIdentity call site: 00765 fprintf
8 755 ZydisReEncodeInstruction call site: 00755 fputs
7 547 ZydisSetAVXInformation call site: 00547 __assert_fail
4 400 ZydisNodeHandlerRexB call site: 00400 __assert_fail
4 638 ZydisSetOperandSizeAndElementInfo call site: 00638 __assert_fail
3 30 ZydisIsBroadcastModeCompatible call site: 00030 __assert_fail
3 107 ZydisCheckVectorMemorySize call site: 00107 __assert_fail
3 153 ZydisGetEffectiveImmSize call site: 00153 __assert_fail
3 167 ZydisIsImmediateOperandCompabile call site: 00167 __assert_fail
3 441 ZydisDecodeOptionalInstructionParts call site: 00441 __assert_fail
3 491 ZydisSetAttributes call site: 00491 __assert_fail

Runtime coverage analysis

Covered functions
145
Functions that are reachable but not covered
6
Reachable functions
148
Percentage of reachable functions covered
95.95%
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 59
src/EncoderData.c 1
src/SharedData.c 6
src/Generated/GetCcInfo.inc 1
src/Register.c 5
src/Decoder.c 58
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 65 14.0%
gold [1:9] 47 10.1%
yellow [10:29] 34 7.37%
greenyellow [30:49] 24 5.20%
lawngreen 50+ 291 63.1%
All colors 461 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
7 251 ZydisSetAVXInformation call site: 00251 __assert_fail
4 102 ZydisNodeHandlerRexB call site: 00102 __assert_fail
4 344 ZydisSetOperandSizeAndElementInfo call site: 00344 __assert_fail
3 144 ZydisDecodeOptionalInstructionParts call site: 00144 __assert_fail
3 194 ZydisSetAttributes call site: 00194 __assert_fail
3 296 ZydisDecodeOperands call site: 00296 ZydisDecodeOperandRegister
2 64 ZydisNodeHandlerOpcode call site: 00064 ZydisNodeHandlerMode
2 280 ZydisDecodeOperandImplicitMemory call site: 00280 ZydisCalcRegisterId
2 385 ZydisValidateEnumRanges call site: 00385 fprintf
1 19 ZydisNodeHandlerXOP call site: 00019 __assert_fail
1 22 ZydisNodeHandlerVEX call site: 00022 __assert_fail
1 26 ZydisNodeHandlerEMVEX call site: 00026 __assert_fail

Runtime coverage analysis

Covered functions
133
Functions that are reachable but not covered
5
Reachable functions
98
Percentage of reachable functions covered
94.9%
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 58
src/DecoderData.c 2
src/SharedData.c 6
src/Register.c 8
src/Formatter.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
ZydisFormatterBasePrintDecorator /src/zydis/src/FormatterBase.c 4 ['N/A', 'N/A', 'N/A', 'int'] 2 0 1837 414 162 4 0 237 235
ZydisFormatterBasePrintPrefixes /src/zydis/src/FormatterBase.c 3 ['N/A', 'N/A', 'N/A'] 3 0 976 226 92 8 0 200 125
ZydisFormatterATTFormatInstruction /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 3 0 727 159 62 8 0 102 79
ZydisFormatterIntelFormatInstructionMASM /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 4 0 38 9 2 9 0 101 61
ZydisFormatterIntelFormatOperandMEM /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 3 0 476 106 44 7 0 80 44
ZydisFormatterIntelPrintTypecast /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 2 0 305 75 28 4 0 54 43
ZydisFormatterATTFormatOperandMEM /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 3 0 452 102 42 7 0 78 42
ZydisFormatterATTPrintIMM /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 4 0 64 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%
183 / 207
Cyclomatic complexity statically reachable by fuzzers
94.0%
2832 / 3003

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', 'ZydisDecodeOptionalInstructionParts', 'ZydisSetAttributes', 'ZydisDecodeOperands', 'ZydisIsBroadcastModeCompatible']

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=['ZydisFuzzTarget', 'ZydisValidateInstructionIdentity', 'ZydisReEncodeInstruction', 'ZydisSetAVXInformation', 'ZydisNodeHandlerRexB', 'ZydisSetOperandSizeAndElementInfo', 'ZydisIsBroadcastModeCompatible', 'ZydisCheckVectorMemorySize', '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', 'ZydisDecodeOptionalInstructionParts', 'ZydisSetAttributes', 'ZydisDecodeOperands', 'ZydisNodeHandlerOpcode', '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/SharedData.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/src/Encoder.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder']
/src/zydis/src/Zydis.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/src/Decoder.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/src/Mnemonic.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/build/../tools/ZydisFuzzReEncoding.c ['ZydisFuzzReEncoding'] []
/src/zydis/src/FormatterBuffer.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/src/Generated/GetCcInfo.inc ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder']
/src/zydis/include/Zydis/Internal/FormatterBase.h [] []
/src/zydis/build/../tools/ZydisFuzzDecoder.c ['ZydisFuzzDecoder'] []
/src/zydis/build/../tools/ZydisFuzzShared.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] []
/src/zydis/src/FormatterBase.c [] []
/src/zydis/src/Utils.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/src/Generated/GetRelInfo.inc ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder']
/src/zydis/src/Segment.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/include/Zydis/Internal/String.h [] []
/src/zydis/src/EncoderData.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder']
/src/zydis/build/../tools/ZydisFuzzEncoder.c ['ZydisFuzzEncoder'] []
/src/zydis/src/FormatterATT.c [] []
/src/zydis/dependencies/zycore/include/Zycore/Format.h [] []
/src/zydis/src/DecoderData.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']
/src/zydis/src/String.c [] []
/src/zydis/src/Formatter.c ['ZydisFuzzDecoder'] ['ZydisFuzzDecoder']
/src/zydis/src/FormatterIntel.c [] []
/src/zydis/src/Register.c ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder'] ['ZydisFuzzReEncoding', 'ZydisFuzzEncoder', 'ZydisFuzzDecoder']

Directories in report

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