Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzzer details

Fuzzer: fuzz_rst

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 67.8%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 65 32.1%
All colors 202 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
60 30 docutils.utils.DependencyList.__init__ call site: 00030 docutils.frontend.OptionParser.get_config_file_settings
55 146 ...fuzz_rst.TestOneInput call site: 00146 docutils.nodes.pending.pformat
4 19 docutils.frontend.OptionParser.__init__ call site: 00019 docutils.frontend.OptionParser.get_standard_config_settings
4 106 docutils.utils.decode_path call site: 00106 sys.getfilesystemencoding
3 99 ...fuzz_rst.TestOneInput call site: 00099 warnings.catch_warnings
3 140 docutils.parsers.rst.Parser.parse call site: 00140 fdp.ConsumeBool
2 27 docutils.frontend.Values.__init__ call site: 00027 docutils.utils.DependencyList.set_output
2 114 docutils.utils.Reporter.__init__ call site: 00114 .isinstance
1 8 docutils.frontend.OptionParser.__init__ call site: 00008 optparse.TitledHelpFormatter
1 17 docutils.frontend.OptionParser.populate_from_components call site: 00017 optparse.OptionParser.defaults.update
1 96 ...fuzz_rst.TestOneInput call site: 00096 fdp.ConsumeIntInRange
1 103 ...fuzz_rst.TestOneInput call site: 00103 docutils.frontend.get_default_settings

Runtime coverage analysis

Covered functions
392
Functions that are reachable but not covered
104
Reachable functions
126
Percentage of reachable functions covered
17.46%
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
/ 1
...fuzz_rst 17
docutils.frontend 58
docutils.utils 16
docutils.io 3
docutils.nodes 33
docutils.parsers.rst 4
docutils.statemachine 5
docutils.writers.odf_odt 4

Fuzzer: fuzz_table

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 5 10.2%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 44 89.7%
All colors 49 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
2 8 docutils.statemachine.ViewList.__init__ call site: 00008 docutils.statemachine.string2lines
1 1 ...fuzz_table.TestOneInput call site: 00001 docutils.statemachine.ViewList.__init__
1 13 docutils.statemachine.string2lines call site: 00013 .len
1 21 docutils.parsers.rst.tableparser.TableParser.find_head_body_sep call site: 00021 line.replace

Runtime coverage analysis

Covered functions
393
Functions that are reachable but not covered
18
Reachable functions
31
Percentage of reachable functions covered
41.94%
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
/ 1
...fuzz_table 8
docutils.statemachine 7
docutils.parsers.rst.tableparser 18

Fuzzer: fuzz_rst_parse

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 77 60.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 51 39.8%
All colors 128 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
60 35 docutils.utils.DependencyList.__init__ call site: 00035 docutils.frontend.OptionParser.get_config_file_settings
4 24 docutils.frontend.OptionParser.__init__ call site: 00024 docutils.frontend.OptionParser.get_standard_config_settings
4 101 docutils.utils.decode_path call site: 00101 sys.getfilesystemencoding
2 32 docutils.frontend.Values.__init__ call site: 00032 docutils.utils.DependencyList.set_output
2 109 docutils.utils.Reporter.__init__ call site: 00109 .isinstance
2 123 docutils.utils.new_document call site: 00123 docutils.frontend.get_default_settings
1 7 ...fuzz_rst_parse.TestOneInput call site: 00007 docutils.frontend.get_default_settings
1 13 docutils.frontend.OptionParser.__init__ call site: 00013 optparse.TitledHelpFormatter
1 22 docutils.frontend.OptionParser.populate_from_components call site: 00022 optparse.OptionParser.defaults.update

Runtime coverage analysis

Covered functions
393
Functions that are reachable but not covered
72
Reachable functions
89
Percentage of reachable functions covered
19.1%
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
/ 1
...fuzz_rst_parse 7
docutils.parsers 3
docutils.utils 16
docutils.frontend 57
docutils.io 3
docutils.nodes 8

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
docutils.writers._html_base.HTMLTranslator.visit_math docutils.writers._html_base 2 ['N/A', 'N/A'] 11 0 5 15 9 111 1 395 356
docutils.writers.odf_odt.Writer.assemble_my_parts docutils.writers.odf_odt 1 ['N/A'] 4 0 13 7 6 82 1 269 251
docutils.core.Publisher.publish docutils.core 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 9 0 11 5 5 167 24 543 232
docutils.utils.math.math2html.Formula.parse docutils.utils.math.math2html 2 ['N/A', 'N/A'] 7 0 7 4 5 67 0 213 192
docutils.transforms.universal.SmartQuotes.apply docutils.transforms.universal 1 ['N/A'] 3 0 3 7 6 48 0 160 142
docutils.parsers.rst.directives.misc.Include.run docutils.parsers.rst.directives.misc 1 ['N/A'] 6 0 9 18 10 148 0 485 125
docutils.parsers.rst.states.Inliner.interpreted_or_phrase_ref docutils.parsers.rst.states 3 ['N/A', 'N/A', 'N/A'] 6 0 0 7 6 47 0 156 115

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

Functions statically reachable by fuzzers
11.0%
244 / 2218
Cyclomatic complexity statically reachable by fuzzers
12.0%
906 / 7493

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 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.

/src/fuzz_rst.py

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=['docutils.utils.DependencyList.__init__', '...fuzz_rst.TestOneInput', 'docutils.frontend.OptionParser.__init__', 'docutils.utils.decode_path', 'docutils.parsers.rst.Parser.parse', 'docutils.frontend.Values.__init__', 'docutils.utils.Reporter.__init__', 'docutils.frontend.OptionParser.populate_from_components']

/src/fuzz_table.py

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=['docutils.statemachine.ViewList.__init__', '...fuzz_table.TestOneInput', 'docutils.statemachine.string2lines', 'docutils.parsers.rst.tableparser.TableParser.find_head_body_sep']

/src/fuzz_rst_parse.py

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=['docutils.utils.DependencyList.__init__', 'docutils.frontend.OptionParser.__init__', 'docutils.utils.decode_path', 'docutils.frontend.Values.__init__', 'docutils.utils.Reporter.__init__', 'docutils.utils.new_document', '...fuzz_rst_parse.TestOneInput', 'docutils.frontend.OptionParser.populate_from_components']

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
[] []
docutils.parsers.rst.languages.nl [] []
docutils.parsers.rst.languages.ko [] []
pygments [] []
docutils.transforms.writer_aux [] []
docutils.languages.sk [] []
docutils.parsers.rst.directives.references [] []
docutils.parsers.rst.languages.en [] []
docutils.parsers.rst.languages.af [] []
docutils.parsers.rst.languages.ka [] []
docutils.transforms.peps [] []
recommonmark [] []
docutils.utils.math.tex2unichar [] []
docutils.parsers.rst.directives.tables [] []
docutils.transforms [] []
docutils.languages.sv [] []
docutils.parsers.rst.languages.da [] []
docutils.utils.math.latex2mathml [] []
docutils.transforms.parts [] []
...fuzz_table ['fuzz_table'] []
docutils.parsers.rst.languages.zh_tw [] []
codecs [] []
docutils.languages.ko [] []
docutils.utils.math.unichar2tex [] []
docutils.transforms.frontmatter [] []
docutils.parsers.null [] []
docutils.parsers.rst.languages.lv [] []
docutils.__main__ [] []
docutils.languages.fi [] []
docutils.parsers.rst.directives.images [] []
docutils.writers.html4css1 [] []
string [] []
docutils.readers.pep [] []
docutils.languages.pl [] []
docutils.transforms.components [] []
docutils.languages.da [] []
docutils.languages.en [] []
itertools [] []
docutils.parsers.recommonmark_wrapper [] []
docutils.languages.lt [] []
docutils.parsers.rst.languages.pl [] []
docutils.core [] []
docutils.languages.ru [] []
xml [] []
docutils.writers.s5_html [] []
weakref [] []
docutils.utils ['fuzz_rst', 'fuzz_rst_parse'] []
docutils.nodes ['fuzz_rst', 'fuzz_rst_parse'] []
docutils.writers._html_base [] []
docutils.languages.he [] []
docutils.languages.gl [] []
docutils.readers [] []
docutils.writers.pep_html [] []
docutils.utils.roman [] []
docutils.languages.fr [] []
mimetypes [] []
docutils.parsers.rst.languages.ru [] []
docutils.writers.odf_odt.pygmentsformatter [] []
docutils.parsers.rst.languages.he [] []
docutils.writers.odf_odt.prepstyles [] []
time [] []
docutils.transforms.references [] []
PIL [] []
tempfile [] []
base64 [] []
sys [] []
atheris [] []
docutils.frontend ['fuzz_rst', 'fuzz_rst_parse'] []
docutils.parsers.commonmark_wrapper [] []
io [] []
docutils.parsers.rst.languages.cs [] []
docutils.parsers.rst.languages.lt [] []
docutils.parsers.rst.languages [] []
docutils.languages.uk [] []
warnings [] []
docutils.writers.odf_odt ['fuzz_rst'] []
...fuzz_rst_parse ['fuzz_rst_parse'] []
locale [] []
docutils.parsers.rst.languages.zh_cn [] []
...fuzz_rst ['fuzz_rst'] []
random [] []
optparse [] []
docutils.parsers.rst.languages.sv [] []
docutils.utils.punctuation_chars [] []
docutils.writers.docutils_xml [] []
unicodedata [] []
docutils.languages.cs [] []
docutils.readers.doctree [] []
pathlib [] []
docutils.parsers.rst.languages.gl [] []
docutils.parsers.rst.languages.es [] []
docutils.writers.manpage [] []
[] []
docutils.languages.ja [] []
docutils.parsers.rst.tableparser ['fuzz_table'] []
configparser [] []
docutils.languages.ca [] []
docutils.utils.urischemes [] []
docutils.readers.standalone [] []
docutils.examples [] []
docutils.languages.af [] []
docutils.utils.smartquotes [] []
docutils.languages.ar [] []
docutils.languages.ka [] []
argparse [] []
docutils.languages.fa [] []
docutils.parsers.rst.languages.ja [] []
docutils.io ['fuzz_rst', 'fuzz_rst_parse'] []
Image [] []
pprint [] []
docutils.writers.latex2e [] []
docutils.writers.html5_polyglot [] []
os [] []
docutils.statemachine ['fuzz_rst', 'fuzz_table'] []
docutils.parsers ['fuzz_rst_parse'] []
docutils.utils.code_analyzer [] []
docutils.parsers.rst.directives.html [] []
docutils.writers.pseudoxml [] []
docutils.parsers.rst.languages.eo [] []
docutils.parsers.rst.languages.ar [] []
docutils.parsers.rst.directives.body [] []
zipfile [] []
types [] []
docutils.parsers.rst.directives.misc [] []
docutils.parsers.rst.languages.pt_br [] []
docutils.languages.es [] []
docutils.parsers.rst ['fuzz_rst'] []
docutils.utils.math.math2html [] []
docutils.transforms.misc [] []
docutils.languages.lv [] []
docutils.parsers.rst.languages.fi [] []
docutils.parsers.rst.languages.de [] []
urllib [] []
docutils.utils.math.tex2mathml_extern [] []
docutils.parsers.rst.languages.fa [] []
docutils.utils.math.mathalphabet2unichar [] []
roman [] []
unittest [] []
docutils.parsers.rst.directives [] []
importlib [] []
docutils.utils.math [] []
docutils [] []
re [] []
docutils.parsers.rst.languages.sk [] []
docutils.writers.null [] []
docutils.languages.zh_cn [] []
docutils.parsers.rst.directives.parts [] []
docutils.writers.xetex [] []
docutils.parsers.rst.languages.ca [] []
docutils.utils.error_reporting [] []
docutils.parsers.rst.states [] []
docutils.languages.it [] []
shutil [] []
docutils.parsers.rst.directives.admonitions [] []
docutils.languages.eo [] []
docutils.parsers.rst.languages.fr [] []
docutils.parsers.rst.roles [] []
docutils.languages.nl [] []
docutils.utils.math.mathml_elements [] []
docutils.languages.pt_br [] []
docutils.writers [] []
docutils.transforms.universal [] []
docutils.parsers.rst.languages.it [] []
collections [] []
csv [] []
subprocess [] []
docutils.languages.de [] []
docutils.languages [] []
docutils.parsers.rst.languages.uk [] []
docutils.languages.zh_tw [] []
copy [] []

Directories in report

Directory