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] 47 6.07%
yellow [10:29] 68 8.78%
greenyellow [30:49] 26 3.35%
lawngreen 50+ 495 63.9%
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 216 ZydisSetAVXInformation call site: 00216 __assert_fail
4 128 ZydisNodeHandlerRexB call site: 00128 __assert_fail
4 344 ZydisSetOperandSizeAndElementInfo call site: 00344 __assert_fail
3 47 ZydisDecodeModRM call site: 00047 __assert_fail
3 159 ZydisSetAttributes call site: 00159 __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 582 ZydisGetEffectiveImmSize call site: 00582 __assert_fail
3 596 ZydisIsImmediateOperandCompabile call site: 00596 __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: 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 161 20.0%
gold [1:9] 31 3.87%
yellow [10:29] 93 11.6%
greenyellow [30:49] 26 3.24%
lawngreen 50+ 490 61.1%
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
15 649 ZydisFuzzTarget call site: 00649 ZydisCalcAbsoluteAddress
12 764 ZydisValidateInstructionIdentity call site: 00764 fprintf
8 754 ZydisReEncodeInstruction call site: 00754 fputs
7 513 ZydisSetAVXInformation call site: 00513 __assert_fail
4 425 ZydisNodeHandlerRexB call site: 00425 __assert_fail
4 637 ZydisSetOperandSizeAndElementInfo call site: 00637 __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 456 ZydisSetAttributes call site: 00456 __assert_fail
3 591 ZydisDecodeOperands call site: 00591 ZydisDecodeOperandRegister

Runtime coverage analysis

Covered functions
147
Functions that are reachable but not covered
5
Reachable functions
149
Percentage of reachable functions covered
96.64%
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: 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] 44 9.54%
yellow [10:29] 32 6.94%
greenyellow [30:49] 18 3.90%
lawngreen 50+ 302 65.5%
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 216 ZydisSetAVXInformation call site: 00216 __assert_fail
4 128 ZydisNodeHandlerRexB call site: 00128 __assert_fail
4 344 ZydisSetOperandSizeAndElementInfo call site: 00344 __assert_fail
3 47 ZydisDecodeModRM call site: 00047 __assert_fail
3 159 ZydisSetAttributes call site: 00159 __assert_fail
3 296 ZydisDecodeOperands call site: 00296 ZydisDecodeOperandRegister
2 104 ZydisTreeWalkFilters call site: 00104 ZydisDecodeModRM
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
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%
2897 / 3077

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

Directories in report

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