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: 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 326 40.6%
gold [1:9] 96 11.9%
yellow [10:29] 92 11.4%
greenyellow [30:49] 51 6.36%
lawngreen 50+ 236 29.4%
All colors 801 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
20 500 ZydisSetAVXInformation call site: 00500 __assert_fail
19 480 ZydisSetAVXInformation call site: 00480 __assert_fail
18 171 ZydisIsDefinitionCompatible call site: 00171 __assert_fail
15 84 ZydisGetCompDispScaleEvex call site: 00084 ZydisGetCompDispScaleMvex
15 649 ZydisFuzzTarget call site: 00649 ZydisCalcAbsoluteAddress
12 764 ZydisValidateInstructionIdentity call site: 00764 fprintf
11 379 ZydisPopulateRegisterIds call site: 00379 ZydisTreeWalkFilters
11 420 ZydisNodeHandlerRexW call site: 00420 ZydisNodeHandlerRexB
9 533 ZydisNodeHandlerOpcode call site: 00533 ZydisDecodeMVEX
8 256 ZydisEmitXop call site: 00256 ZydisEmitVex
8 754 ZydisReEncodeInstruction call site: 00754 fputs
7 191 ZydisHandleSwappableDefinition call site: 00191 ZydisGetInstructionDefinition

Runtime coverage analysis

Covered functions
137
Functions that are reachable but not covered
15
Reachable functions
149
Percentage of reachable functions covered
89.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.
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 59
src/DecoderData.c 2
src/Utils.c 1
src/Generated/GetRelInfo.inc 1

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 143 18.4%
gold [1:9] 58 7.49%
yellow [10:29] 55 7.10%
greenyellow [30:49] 24 3.10%
lawngreen 50+ 494 63.8%
All colors 774 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 737 ZydisValidateInstructionIdentity call site: 00737 fprintf
8 727 ZydisReEncodeInstruction call site: 00727 fputs
7 217 ZydisSetAVXInformation call site: 00217 __assert_fail
4 128 ZydisNodeHandlerRexB call site: 00128 __assert_fail
4 345 ZydisSetOperandSizeAndElementInfo call site: 00345 __assert_fail
3 29 ZydisNodeHandlerREX2 call site: 00029 ZydisGetInstructionDefinition
3 47 ZydisDecodeModRM call site: 00047 __assert_fail
3 159 ZydisSetAttributes call site: 00159 __assert_fail
3 297 ZydisDecodeOperands call site: 00297 ZydisDecodeOperandRegister
3 434 ZydisReEncodeInstruction call site: 00434 __assert_fail
3 537 ZydisCheckVectorMemorySize call site: 00537 __assert_fail
3 583 ZydisGetEffectiveImmSize call site: 00583 __assert_fail

Runtime coverage analysis

Covered functions
146
Functions that are reachable but not covered
5
Reachable functions
148
Percentage of reachable functions covered
96.62%
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 59
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: 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 71 15.3%
gold [1:9] 48 10.3%
yellow [10:29] 28 6.06%
greenyellow [30:49] 20 4.32%
lawngreen 50+ 295 63.8%
All colors 462 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 217 ZydisSetAVXInformation call site: 00217 __assert_fail
4 128 ZydisNodeHandlerRexB call site: 00128 __assert_fail
4 345 ZydisSetOperandSizeAndElementInfo call site: 00345 __assert_fail
3 29 ZydisNodeHandlerREX2 call site: 00029 ZydisGetInstructionDefinition
3 47 ZydisDecodeModRM call site: 00047 __assert_fail
3 159 ZydisSetAttributes call site: 00159 __assert_fail
3 297 ZydisDecodeOperands call site: 00297 ZydisDecodeOperandRegister
2 104 ZydisTreeWalkFilters call site: 00104 ZydisDecodeModRM
2 262 ZydisNodeHandlerOpcode call site: 00262 ZydisDecoderDecodeOperands
2 281 ZydisDecodeOperandImplicitMemory call site: 00281 ZydisCalcRegisterId
2 386 ZydisValidateEnumRanges call site: 00386 fprintf
1 5 ZydisDecoderDecodeFull call site: 00005 ZydisCollectOptionalPrefixes

Runtime coverage analysis

Covered functions
139
Functions that are reachable but not covered
4
Reachable functions
99
Percentage of reachable functions covered
95.96%
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 59
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
ZydisFormatterIntelPrintDecoratorMASM /src/zydis/src/FormatterIntel.c 4 ['N/A', 'N/A', 'N/A', 'int'] 3 0 54 15 4 6 0 244 242
ZydisFormatterBasePrintPrefixes /src/zydis/src/FormatterBase.c 3 ['N/A', 'N/A', 'N/A'] 3 0 984 228 93 9 0 202 127
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
ZydisFormatterIntelPrintTypecastMASM /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 3 0 140 35 11 6 0 68 54
ZydisFormatterATTFormatOperandMEM /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 3 0 491 111 46 7 0 82 46
ZydisFormatterIntelFormatOperandMEM /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 3 0 476 106 44 7 0 80 44
ZydisFormatterATTPrintIMM /src/zydis/src/FormatterATT.c 3 ['N/A', 'N/A', 'N/A'] 4 0 64 17 5 14 0 98 40

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

Functions statically reachable by fuzzers
89.0%
188 / 212
Cyclomatic complexity statically reachable by fuzzers
94.0%
2913 / 3093

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=['ZydisSetAVXInformation', 'ZydisIsDefinitionCompatible', 'ZydisGetCompDispScaleEvex', 'ZydisFuzzTarget', 'ZydisValidateInstructionIdentity', 'ZydisPopulateRegisterIds', 'ZydisNodeHandlerRexW', 'ZydisNodeHandlerOpcode', 'ZydisEmitXop']

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', 'ZydisNodeHandlerREX2', 'ZydisDecodeModRM', '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=['ZydisSetAVXInformation', 'ZydisNodeHandlerRexB', 'ZydisSetOperandSizeAndElementInfo', 'ZydisNodeHandlerREX2', 'ZydisDecodeModRM', 'ZydisSetAttributes', 'ZydisDecodeOperands', 'ZydisTreeWalkFilters', 'ZydisNodeHandlerOpcode', 'ZydisDecodeOperandImplicitMemory']

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

Directories in report

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