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

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 3326 63.2%
gold [1:9] 139 2.64%
yellow [10:29] 128 2.43%
greenyellow [30:49] 124 2.35%
lawngreen 50+ 1544 29.3%
All colors 5261 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
6837 18865 14 :

['xmlFatalErr', 'xmlFatalErrMsg', 'xmlWarningMsg', 'xmlParseStringCharRef', 'xmlSBufAddReplChar', 'xmlHaltParser', 'xmlParserEntityCheck', 'xmlLoadEntityContent', 'xmlParseStringName', 'xmlParseStringPEReference', 'xmlExpandPEsInEntityValue', 'xmlUTF8MultibyteLen', 'xmlSBufAddChar', 'xmlSBufAddString']

6837 18865 xmlExpandPEsInEntityValue call site: 02075 /src/libxml2/parser.c:3556
6837 6837 1 :

['xmlParseElementDecl']

6837 6837 xmlParseMarkupDecl call site: 01929 /src/libxml2/parser.c:6939
1561 1561 2 :

['xmlXPathModValues', 'xmlXPathDivValues']

1561 1561 xmlXPathCompOpEval call site: 02593 /src/libxml2/xpath.c:10810
927 927 1 :

['xmlXPathNotEqualValues']

927 1209 xmlXPathCompOpEval call site: 02593 /src/libxml2/xpath.c:10773
911 2155 4 :

['xmlFatalErrMsg', 'xmlStrEqual', 'xmlParseTextDecl', 'xmlDetectEncoding']

911 10642 xmlCtxtParseContentInternal call site: 01320 /src/libxml2/parser.c:11714
856 1024 3 :

['xmlXPathNewString', 'xmlXPathIdFunction', 'xmlXPathValuePush']

856 1458 xmlXPtrEvalChildSeq call site: 04201 /src/libxml2/xpointer.c:481
779 779 1 :

['xmlXPathSubValues']

779 779 xmlXPathCompOpEval call site: 02593 /src/libxml2/xpath.c:10794
774 774 1 :

['xsltFreeStylesheet']

774 774 xsltNewStylesheetInternal call site: 00000 /src/libxslt/libxslt/xslt.c:796
766 803 2 :

['xmlNsWarnMsg', 'xmlNewNs']

1129 5860 xmlSAX2StartElementNs call site: 00000 /src/libxml2/SAX2.c:2285
766 766 1 :

['xmlWarnMsg']

766 766 xmlSAX2EntityDecl call site: 02154 /src/libxml2/SAX2.c:537
754 754 1 :

['xmlInsertProp']

754 754 xmlInsertNode call site: 03553 /src/libxml2/tree.c:2797
734 734 1 :

['xmlSwitchInputEncodingName']

734 734 xmlCtxtNewInputFromMemory call site: 00148 /src/libxml2/parserInternals.c:1875

Runtime coverage analysis

Covered functions
749
Functions that are reachable but not covered
438
Reachable functions
1057
Percentage of reachable functions covered
58.56%
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
libxslt/tests/fuzz/xpath.c 1
libxslt/tests/fuzz/fuzz.c 7
libxml2/hash.c 30
libxml2/threads.c 10
libxml2/dict.c 22
libxml2/error.c 15
libxml2/xmlmemory.c 1
libxml2/globals.c 20
libxml2/encoding.c 16
libxml2/xpath.c 169
libxml2/xmlIO.c 18
libxml2/catalog.c 33
libxml2/parser.c 139
libxml2/parserInternals.c 42
libxml2/SAX2.c 6
libxml2/buf.c 26
libxml2/HTMLparser.c 2
libxml2/xmlstring.c 22
libxml2/tree.c 97
libxml2/./include/private/memory.h 1
libxml2/chvalid.c 1
libxml2/uri.c 40
libxml2/entities.c 11
libxml2/valid.c 41
libxml2/list.c 3
libxslt/libxslt/transform.c 48
libxslt/libxslt/extensions.c 15
libxslt/libxslt/xsltutils.c 11
libxslt/libxslt/variables.c 23
libxml2/./timsort.h 12
libxslt/libxslt/extra.c 1
libxml2/debugXML.c 27
libxslt/libxslt/templates.c 6
libxslt/libxslt/keys.c 9
libxslt/libxslt/namespaces.c 3
libxslt/libxslt/imports.c 4
libxslt/libxslt/attributes.c 2
libxslt/libxslt/attrvt.c 1
libxslt/libxslt/functions.c 12
libxslt/libxslt/documents.c 4
libxslt/libxslt/security.c 4
libxml2/xinclude.c 27
libxml2/xpointer.c 8
libxslt/libxslt/xslt.c 2
libxslt/libxslt/numbers.c 16
libxslt/libxslt/pattern.c 9

Fuzzer: xslt

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 2275 31.8%
gold [1:9] 232 3.24%
yellow [10:29] 57 0.79%
greenyellow [30:49] 19 0.26%
lawngreen 50+ 4567 63.8%
All colors 7150 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
3364 3364 1 :

['xsltEvalUserParams']

3364 19879 xsltApplyStylesheetInternal call site: 07056 /src/libxslt/libxslt/transform.c:6016
1883 3469 3 :

['xmlXPathCtxtCompile', 'xmlXPathFreeCompExpr', 'xsltEvalXPathString']

7787 72283 xsltDocumentElem call site: 03579 /src/libxslt/libxslt/transform.c:3411
1623 1623 1 :

['xhtmlNodeDumpOutput']

1623 1623 xmlNodeDumpOutput call site: 04280 /src/libxml2/xmlsave.c:2374
766 5460 4 :

['xmlDictQLookup', 'xmlBuildQName', 'xmlNsWarnMsg', 'xmlSAX2AttributeNs']

766 5702 xmlSAX2StartElementNs call site: 00000 /src/libxml2/SAX2.c:2287
754 754 1 :

['xmlInsertProp']

754 754 xmlInsertNode call site: 03791 /src/libxml2/tree.c:2797
734 734 1 :

['xmlSwitchInputEncodingName']

734 734 xmlCtxtNewInputFromMemory call site: 00187 /src/libxml2/parserInternals.c:1875
734 734 1 :

['xmlSwitchInputEncodingName']

734 734 xmlCtxtNewInputFromString call site: 00655 /src/libxml2/parserInternals.c:1936
734 734 1 :

['xmlSwitchInputEncodingName']

734 734 xmlNewIOInputStream call site: 00000 /src/libxml2/parserInternals.c:2154
642 1107 2 :

['xmlFreeProp', 'xmlNodeParseContent']

842 1307 xmlNewDocProp call site: 01431 /src/libxml2/tree.c:1656
642 642 1 :

['xmlNodeParseContent']

842 842 xmlNewElem call site: 01199 /src/libxml2/tree.c:1863
462 462 1 :

['xmlParseCatalogPI']

462 462 xmlParsePI call site: 00509 /src/libxml2/parser.c:5306
278 278 1 :

['xmlSetListDoc']

278 535 xmlSetTreeDoc call site: 01407 /src/libxml2/tree.c:2614

Runtime coverage analysis

Covered functions
1355
Functions that are reachable but not covered
268
Reachable functions
1317
Percentage of reachable functions covered
79.65%
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
libxslt/tests/fuzz/xslt.c 1
libxslt/tests/fuzz/fuzz.c 11
libxml2/hash.c 32
libxml2/threads.c 10
libxml2/dict.c 23
libxml2/error.c 15
libxml2/xmlmemory.c 1
libxml2/globals.c 24
libxml2/encoding.c 21
libxml2/xpath.c 167
libxml2/xmlIO.c 30
libxml2/catalog.c 33
libxml2/xmlstring.c 22
libxml2/parser.c 139
libxml2/parserInternals.c 42
libxml2/SAX2.c 6
libxml2/buf.c 26
libxml2/HTMLparser.c 6
libxml2/tree.c 104
libxml2/./include/private/memory.h 1
libxml2/chvalid.c 1
libxml2/uri.c 40
libxml2/entities.c 11
libxml2/valid.c 41
libxml2/list.c 3
libxslt/libxslt/xslt.c 35
libxslt/libxslt/xsltutils.c 21
libxslt/libxslt/extra.c 3
libxslt/libxslt/extensions.c 36
libxml2/debugXML.c 27
libxslt/libxslt/preproc.c 29
libxslt/libxslt/templates.c 8
libxslt/libxslt/transform.c 54
libxml2/./timsort.h 12
libxslt/libxslt/security.c 7
libxslt/libxslt/imports.c 8
libxslt/libxslt/variables.c 31
libxslt/libxslt/keys.c 16
libxslt/libxslt/namespaces.c 5
libxslt/libxslt/attributes.c 20
libxslt/libxslt/attrvt.c 6
libxml2/HTMLtree.c 14
libxml2/xmlsave.c 31
libxslt/libxslt/pattern.c 30
libxslt/libxslt/documents.c 7
libxslt/libxslt/functions.c 12
libxml2/xinclude.c 27
libxml2/xpointer.c 8
libxslt/libxslt/numbers.c 16

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
LLVMFuzzerInitialize /src/libxslt/tests/fuzz/xpath.c 2 ['N/A', 'N/A'] 27 0 18 3 2 1058 0 11335 1985
xmlParseInNodeContext /src/libxml2/parser.c 5 ['N/A', 'N/A', 'int', 'int', 'N/A'] 56 0 171 28 12 611 0 7608 700
xmlParseSGMLCatalog /src/libxml2/catalog.c 4 ['N/A', 'N/A', 'N/A', 'int'] 14 0 1106 234 79 123 6 1566 255
xmlDOMWrapAdoptNode /src/libxml2/tree.c 6 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'int'] 12 0 256 51 15 50 0 578 247
xmlSAX2StartElementNs /src/libxml2/SAX2.c 9 ['N/A', 'N/A', 'N/A', 'N/A', 'int', 'N/A', 'int', 'int', 'N/A'] 25 0 759 108 42 200 0 1641 191
xmlDOMWrapCloneNode /src/libxml2/tree.c 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'int', 'int'] 12 0 1604 297 98 106 0 788 98
xsltLoadStylesheetPI /src/libxslt/libxslt/xslt.c 1 ['N/A'] 31 0 410 68 26 850 0 10122 96

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

Functions statically reachable by fuzzers
70.0%
1591 / 2284
Cyclomatic complexity statically reachable by fuzzers
82.0%
19665 / 23858

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

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/libxslt/tests/fuzz/xslt.c ['xslt'] ['xslt']
/src/libxslt/libxslt/imports.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/encoding.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/xslt.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/attributes.c ['xpath', 'xslt'] ['xslt']
/src/libxml2/buf.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/entities.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/list.c ['xpath', 'xslt'] ['xslt']
/src/libxml2/xmlstring.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libexslt/strings.c [] []
/src/libxml2/catalog.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libexslt/functions.c [] []
/src/libxslt/libexslt/crypto.c [] []
/src/libxslt/libxslt/xsltutils.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/namespaces.c ['xpath', 'xslt'] ['xslt']
/src/libxslt/libxslt/extensions.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/error.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libexslt/exslt.c [] []
/src/libxml2/tree.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/xmlIO.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/xpointer.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/functions.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libexslt/common.c [] []
/src/libxml2/parser.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/xpath.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/keys.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/documents.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/hash.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/xinclude.c ['xpath', 'xslt'] []
/src/libxslt/tests/fuzz/xpath.c ['xpath'] ['xpath']
/src/libxml2/parserInternals.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/valid.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/extra.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/debugXML.c ['xpath', 'xslt'] []
/src/libxml2/./include/private/memory.h ['xpath', 'xslt'] []
/src/libxslt/libxslt/variables.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/attrvt.c ['xpath', 'xslt'] ['xslt']
/src/libxml2/SAX2.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libexslt/sets.c [] []
/src/libxslt/libxslt/pattern.c ['xpath', 'xslt'] ['xslt']
/src/libxslt/libxslt/preproc.c ['xslt'] ['xslt']
/src/libxslt/libxslt/transform.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libxslt/xsltlocale.c [] []
/src/libxml2/chvalid.c ['xpath', 'xslt'] ['xslt']
/src/libxml2/threads.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libexslt/dynamic.c [] []
/src/libxslt/libxslt/templates.c ['xpath', 'xslt'] ['xslt']
/src/libxslt/libexslt/saxon.c [] []
/src/libxml2/uri.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/./timsort.h ['xpath', 'xslt'] []
/src/libxml2/dict.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/HTMLtree.c ['xslt'] ['xslt']
/src/libxml2/xmlsave.c ['xslt'] ['xslt']
/src/libxml2/globals.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/HTMLparser.c ['xpath', 'xslt'] ['xslt']
/src/libxslt/libexslt/date.c [] []
/src/libxslt/libxslt/security.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/libexslt/math.c [] []
/src/libxslt/libxslt/numbers.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxml2/xmlmemory.c ['xpath', 'xslt'] ['xpath', 'xslt']
/src/libxslt/tests/fuzz/fuzz.c ['xpath', 'xslt'] ['xpath', 'xslt']

Directories in report

Directory
/src/libxslt/libxslt/
/src/libxml2/./include/private/
/src/libxslt/libexslt/
/src/libxml2/
/src/libxml2/./
/src/libxslt/tests/fuzz/