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 3420 63.8%
gold [1:9] 161 3.00%
yellow [10:29] 86 1.60%
greenyellow [30:49] 46 0.85%
lawngreen 50+ 1640 30.6%
All colors 5353 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
7047 19237 14 :

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

7047 19237 xmlExpandPEsInEntityValue call site: 02127 /src/libxml2/parser.c:3836
7047 7047 1 :

['xmlParseElementDecl']

7047 7047 xmlParseMarkupDecl call site: 01968 /src/libxml2/parser.c:7149
3171 3418 5 :

['xmlXPathFreeContext', 'xmlXPathFreeObject', 'xmlXPathNewContext', 'xsltTransformError', 'xmlXPtrEval']

3171 3818 xsltDocumentFunctionLoadDocument call site: 04050 /src/libxslt/libxslt/functions.c:120
2130 2181 3 :

['xmlStrEqual', 'xsltInitDocKeyTable', 'xmlHashLookup']

2130 2181 xsltGetKey call site: 04584 /src/libxslt/libxslt/keys.c:477
1571 1571 2 :

['xmlXPathModValues', 'xmlXPathDivValues']

1571 1571 xmlXPathCompOpEval call site: 02669 /src/libxml2/xpath.c:11414
1073 1073 1 :

['xsltFreeStylesheet']

1073 1073 xsltNewStylesheetInternal call site: 00000 /src/libxslt/libxslt/xslt.c:796
1042 1042 1 :

['xmlInsertProp']

1042 1042 xmlInsertNode call site: 03636 /src/libxml2/tree.c:3029
1026 3210 4 :

['xmlNewDtd', 'xmlNewDoc', 'xmlSAX2EntityDecl', 'xmlErrMemory']

1026 12152 xmlParseEntityDecl call site: 02177 /src/libxml2/parser.c:5778
936 2201 4 :

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

936 11231 xmlCtxtParseContentInternal call site: 01337 /src/libxml2/parser.c:11975
809 809 1 :

['xmlXPathEqualValuesCommon']

809 809 xmlXPathEqualValues call site: 02706 /src/libxml2/xpath.c:5951
802 802 1 :

['htmlNewDocNoDtD']

1118 1118 xmlSAX2StartDocument call site: 00000 /src/libxml2/SAX2.c:819
760 760 1 :

['xmlSwitchInputEncodingName']

760 760 xmlCtxtNewInputFromMemory call site: 00151 /src/libxml2/parserInternals.c:1920

Runtime coverage analysis

Covered functions
731
Functions that are reachable but not covered
447
Reachable functions
1058
Percentage of reachable functions covered
57.75%
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 21
libxml2/encoding.c 16
libxml2/xpath.c 170
libxml2/xmlIO.c 18
libxml2/catalog.c 33
libxml2/parser.c 134
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 15
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 2291 31.6%
gold [1:9] 242 3.33%
yellow [10:29] 43 0.59%
greenyellow [30:49] 28 0.38%
lawngreen 50+ 4646 64.0%
All colors 7250 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
3495 3495 1 :

['xsltEvalUserParams']

3495 23033 xsltApplyStylesheetInternal call site: 07156 /src/libxslt/libxslt/transform.c:6016
2730 2730 1 :

['xhtmlNodeDumpOutput']

2730 2730 xmlNodeDumpOutput call site: 04353 /src/libxml2/xmlsave.c:2506
1886 3524 3 :

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

8225 77111 xsltDocumentElem call site: 03669 /src/libxslt/libxslt/transform.c:3411
1218 2074 4 :

['xmlStrcasestr', 'xmlFreeNode', 'xmlUnlinkNode', 'xmlSetProp']

1218 2074 htmlSetMetaEncoding call site: 04170 /src/libxml2/HTMLtree.c:265
1042 1042 1 :

['xmlInsertProp']

1042 1042 xmlInsertNode call site: 03880 /src/libxml2/tree.c:3029
948 1716 2 :

['xmlNodeParseContent', 'xmlFreeProp']

1148 1916 xmlNewDocProp call site: 01448 /src/libxml2/tree.c:1843
948 948 1 :

['xmlNodeParseContent']

1148 1148 xmlNewElem call site: 01201 /src/libxml2/tree.c:2062
760 760 1 :

['xmlSwitchInputEncodingName']

760 760 xmlCtxtNewInputFromMemory call site: 00190 /src/libxml2/parserInternals.c:1920
760 760 1 :

['xmlSwitchInputEncodingName']

760 760 xmlCtxtNewInputFromString call site: 00635 /src/libxml2/parserInternals.c:1985
760 760 1 :

['xmlSwitchInputEncodingName']

760 760 xmlNewIOInputStream call site: 00000 /src/libxml2/parserInternals.c:2215
756 5297 4 :

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

756 5539 xmlSAX2StartElementNs call site: 00000 /src/libxml2/SAX2.c:2284
457 457 1 :

['xmlParseCatalogPI']

457 457 xmlParsePI call site: 00508 /src/libxml2/parser.c:5566

Runtime coverage analysis

Covered functions
1350
Functions that are reachable but not covered
269
Reachable functions
1315
Percentage of reachable functions covered
79.54%
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 25
libxml2/encoding.c 20
libxml2/xpath.c 168
libxml2/xmlIO.c 29
libxml2/catalog.c 33
libxml2/xmlstring.c 23
libxml2/parser.c 134
libxml2/parserInternals.c 42
libxml2/SAX2.c 6
libxml2/buf.c 26
libxml2/HTMLparser.c 6
libxml2/tree.c 105
libxml2/./include/private/memory.h 1
libxml2/chvalid.c 1
libxml2/uri.c 40
libxml2/entities.c 17
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 8
libxml2/xmlsave.c 32
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'] 32 0 18 3 2 1053 0 11654 1985
xmlParseInNodeContext /src/libxml2/parser.c 5 ['N/A', 'N/A', 'int', 'int', 'N/A'] 57 0 171 28 12 612 0 7820 725
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 581 247
xmlSAX2StartElementNs /src/libxml2/SAX2.c 9 ['N/A', 'N/A', 'N/A', 'N/A', 'int', 'N/A', 'int', 'int', 'N/A'] 28 0 862 126 50 195 0 1601 198
xmlValidateNMToken /src/libxml2/tree.c 2 ['N/A', 'int'] 2 0 1183 272 110 3 0 146 110
xmlDOMWrapCloneNode /src/libxml2/tree.c 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'int', 'int'] 13 0 1604 297 98 108 0 807 98

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

Functions statically reachable by fuzzers
70.0%
1586 / 2268
Cyclomatic complexity statically reachable by fuzzers
83.0%
20418 / 24721

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

Directories in report

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