Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues
Report generation date: 2024-05-20

Project overview: docutils

High level conclusions

Reachability and coverage overview

Functions statically reachable by fuzzers
3.0%
61 / 2233
Cyclomatic complexity statically reachable by fuzzers
3.0%
214 / 7544
Runtime code coverage of functions
15.0%
337 / 2233

Warning: The number of runtime covered functions are larger than the number of reachable functions. This means that Fuzz Introspector found there are more functions covered at runtime than what is considered reachable based on the static analysis. This is a limitation in the analysis as anything covered at runtime is by definition reachable by the fuzzers.
This is likely due to a limitation in the static analysis. In this case, the count of functions covered at runtime is the true value, which means this is what should be considered "achieved" by the fuzzer.

Use the project functions table below to query all functions that were not covered at runtime.

Fuzzer details

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 32 65.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 17 34.6%
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
24 24 ...fuzz_table.TestOneInput call site: 00024 docutils.parsers.rst.tableparser.GridTableParser.scan_cell
3 15 ...fuzz_table.TestOneInput call site: 00015 .len
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
382
Functions that are reachable but not covered
28
Reachable functions
31
Percentage of reachable functions covered
9.68%
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
382
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

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
381
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 3

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 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 154 24 502 238
docutils.utils.math.math2html.Formula.parse docutils.utils.math.math2html 2 ['N/A', 'N/A'] 8 0 7 4 5 66 0 210 189
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 151 0 494 125
docutils.parsers.rst.states.Inliner.interpreted_or_phrase_ref docutils.parsers.rst.states 3 ['N/A', 'N/A', 'N/A'] 5 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%
242 / 2233
Cyclomatic complexity statically reachable by fuzzers
12.0%
901 / 7544

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_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=['...fuzz_table.TestOneInput', 'docutils.statemachine.ViewList.__init__', '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']

/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']

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

Directories in report

Directory