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 137 17.7%
gold [1:9] 53 6.88%
yellow [10:29] 65 8.44%
greenyellow [30:49] 18 2.33%
lawngreen 50+ 497 64.5%
All colors 770 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 733 ZydisValidateInstructionIdentity call site: 00733 fprintf
8 723 ZydisReEncodeInstruction call site: 00723 fputs
7 216 ZydisSetAVXInformation call site: 00216 __assert_fail
4 127 ZydisNodeHandlerRexB call site: 00127 __assert_fail
4 343 ZydisSetOperandSizeAndElementInfo call site: 00343 __assert_fail
3 46 ZydisDecodeModRM call site: 00046 __assert_fail
3 158 ZydisSetAttributes call site: 00158 __assert_fail
3 295 ZydisDecodeOperands call site: 00295 ZydisDecodeOperandRegister
3 432 ZydisReEncodeInstruction call site: 00432 __assert_fail
3 461 ZydisIsBroadcastModeCompatible call site: 00461 __assert_fail
3 534 ZydisCheckVectorMemorySize call site: 00534 __assert_fail
3 580 ZydisGetEffectiveImmSize call site: 00580 __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
include/Zydis/Internal/DecoderData.h 2
include/Zydis/Internal/SharedData.h 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.2%
gold [1:9] 34 4.26%
yellow [10:29] 91 11.4%
greenyellow [30:49] 27 3.38%
lawngreen 50+ 484 60.7%
All colors 797 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 645 ZydisFuzzTarget call site: 00645 ZydisCalcAbsoluteAddress
12 760 ZydisValidateInstructionIdentity call site: 00760 fprintf
8 750 ZydisReEncodeInstruction call site: 00750 fputs
7 508 ZydisSetAVXInformation call site: 00508 __assert_fail
4 423 ZydisNodeHandlerRexB call site: 00423 __assert_fail
4 633 ZydisSetOperandSizeAndElementInfo call site: 00633 __assert_fail
3 30 ZydisIsBroadcastModeCompatible call site: 00030 __assert_fail
3 108 ZydisCheckVectorMemorySize call site: 00108 __assert_fail
3 154 ZydisGetEffectiveImmSize call site: 00154 __assert_fail
3 168 ZydisIsImmediateOperandCompabile call site: 00168 __assert_fail
3 344 ZydisDecodeModRM call site: 00344 __assert_fail
3 454 ZydisSetAttributes call site: 00454 __assert_fail

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
include/Zydis/Internal/SharedData.h 6
src/Generated/GetCcInfo.inc 1
src/Register.c 5
src/Decoder.c 59
include/Zydis/Internal/DecoderData.h 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.1%
gold [1:9] 49 10.6%
yellow [10:29] 29 6.30%
greenyellow [30:49] 16 3.47%
lawngreen 50+ 301 65.4%
All colors 460 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 127 ZydisNodeHandlerRexB call site: 00127 __assert_fail
4 343 ZydisSetOperandSizeAndElementInfo call site: 00343 __assert_fail
3 46 ZydisDecodeModRM call site: 00046 __assert_fail
3 158 ZydisSetAttributes call site: 00158 __assert_fail
3 295 ZydisDecodeOperands call site: 00295 ZydisDecodeOperandRegister
2 103 ZydisTreeWalkFilters call site: 00103 ZydisDecodeModRM
2 279 ZydisDecodeOperandImplicitMemory call site: 00279 ZydisCalcRegisterId
2 384 ZydisValidateEnumRanges call site: 00384 fprintf
1 18 ZydisNodeHandlerXOP call site: 00018 __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
include/Zydis/Internal/DecoderData.h 2
include/Zydis/Internal/SharedData.h 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 747 163 64 8 0 104 81
ZydisFormatterIntelFormatInstructionMASM /src/zydis/src/FormatterIntel.c 3 ['N/A', 'N/A', 'N/A'] 4 0 38 9 2 9 0 103 63
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%
2936 / 3116

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

Directories in report

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