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

Fuzzer details

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 108 82.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 23 17.5%
All colors 131 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
68 29 docutils.frontend.Values.__init__ call site: 00029 docutils.frontend.OptionParser.get_config_file_settings
11 100 docutils.frontend.OptionParser.get_default_values call site: 00100 docutils.utils.new_reporter
9 18 docutils.frontend.OptionParser.populate_from_components call site: 00018 docutils.frontend.OptionParser.get_standard_config_settings
8 6 ...fuzz_rst_parse.TestOneInput call site: 00006 docutils.frontend.get_default_settings
3 112 docutils.io.ErrorOutput.__init__ call site: 00112 docutils.nodes.document.__init__
3 116 docutils.nodes.document.__init__ call site: 00116 docutils.nodes.Element.extend
2 3 docutils.parsers.get_parser_class call site: 00003 PARSER_ALIASES.get
2 126 docutils.nodes.document.note_source call site: 00126 docutils.frontend.get_default_settings
1 120 docutils.nodes.Element.append call site: 00120 attributes.items
1 124 docutils.nodes.document.__init__ call site: 00124 docutils.nodes.document.note_source

Runtime coverage analysis

Covered functions
370
Functions that are reachable but not covered
71
Reachable functions
90
Percentage of reachable functions covered
21.11%
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 6
docutils.parsers 3
docutils.utils 16
docutils.frontend 58
docutils.io 3
docutils.nodes 10

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 154 80.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 37 19.3%
All colors 191 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
68 25 docutils.frontend.Values.__init__ call site: 00025 docutils.frontend.OptionParser.get_config_file_settings
40 150 ...fuzz_rst.TestOneInput call site: 00150 docutils.nodes.pending.pformat
12 105 ...fuzz_rst.TestOneInput call site: 00105 docutils.frontend.get_default_settings
9 14 docutils.frontend.OptionParser.populate_from_components call site: 00014 docutils.frontend.OptionParser.get_standard_config_settings
7 3 ...fuzz_rst.TestOneInput call site: 00003 docutils.frontend.OptionParser.__init__
3 101 ...fuzz_rst.TestOneInput call site: 00101 warnings.catch_warnings
3 118 docutils.io.ErrorOutput.__init__ call site: 00118 docutils.nodes.document.__init__
3 122 docutils.nodes.document.__init__ call site: 00122 docutils.nodes.Element.extend
3 132 docutils.nodes.document.note_source call site: 00132 docutils.parsers.rst.Parser.parse
3 144 docutils.parsers.rst.Parser.parse call site: 00144 fdp.ConsumeBool
1 98 ...fuzz_rst.TestOneInput call site: 00098 fdp.ConsumeIntInRange
1 126 docutils.nodes.Element.append call site: 00126 attributes.items

Runtime coverage analysis

Covered functions
369
Functions that are reachable but not covered
92
Reachable functions
117
Percentage of reachable functions covered
21.37%
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 16
docutils.frontend 59
docutils.utils 16
docutils.io 3
docutils.nodes 23
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 18 36.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 31 63.2%
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
7 34 docutils.parsers.rst.tableparser.GridTableParser.scan_up call site: 00034 docutils.parsers.rst.tableparser.update_dict_of_lists
5 42 docutils.parsers.rst.tableparser.GridTableParser.mark_done call site: 00042 docutils.parsers.rst.tableparser.GridTableParser.check_parse_complete
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 26 docutils.parsers.rst.tableparser.GridTableParser.parse_table call site: 00026 docutils.parsers.rst.tableparser.GridTableParser.scan_right
1 32 docutils.parsers.rst.tableparser.GridTableParser.scan_left call site: 00032 docutils.parsers.rst.tableparser.GridTableParser.scan_up

Runtime coverage analysis

Covered functions
370
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

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'] 6 0 5 15 9 111 1 395 362
docutils.writers.odf_odt.Writer.assemble_my_parts docutils.writers.odf_odt 1 ['N/A'] 5 0 13 7 6 83 1 273 258
docutils.parsers.rst.directives.misc.Include.run docutils.parsers.rst.directives.misc 1 ['N/A'] 7 0 2 5 5 154 0 503 197
docutils.utils.math.math2html.Formula.parse docutils.utils.math.math2html 2 ['N/A', 'N/A'] 8 0 7 4 5 65 0 207 183
docutils.transforms.universal.SmartQuotes.apply docutils.transforms.universal 1 ['N/A'] 3 0 3 7 6 48 0 160 139
docutils.writers._html_base.HTMLTranslator.visit_image docutils.writers._html_base 2 ['N/A', 'N/A'] 5 0 5 11 7 80 0 259 132
docutils.core.Publisher.publish docutils.core 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 7 0 11 5 5 137 25 451 130

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

Functions statically reachable by fuzzers
10.0%
232 / 2260
Cyclomatic complexity statically reachable by fuzzers
11.0%
872 / 7645

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_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.frontend.Values.__init__', 'docutils.frontend.OptionParser.get_default_values', 'docutils.frontend.OptionParser.populate_from_components', '...fuzz_rst_parse.TestOneInput', 'docutils.io.ErrorOutput.__init__', 'docutils.nodes.document.__init__', 'docutils.parsers.get_parser_class', 'docutils.nodes.document.note_source', 'docutils.nodes.Element.append']

/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.frontend.Values.__init__', '...fuzz_rst.TestOneInput', 'docutils.frontend.OptionParser.populate_from_components', 'docutils.io.ErrorOutput.__init__', 'docutils.nodes.document.__init__', 'docutils.nodes.document.note_source', 'docutils.parsers.rst.Parser.parse']

/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.parsers.rst.tableparser.GridTableParser.scan_up', 'docutils.parsers.rst.tableparser.GridTableParser.mark_done', 'docutils.statemachine.ViewList.__init__', '...fuzz_table.TestOneInput', 'docutils.statemachine.string2lines', 'docutils.parsers.rst.tableparser.GridTableParser.parse_table', 'docutils.parsers.rst.tableparser.GridTableParser.scan_left']

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

Directories in report

Directory