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

Fuzzer details

Fuzzer: fuzz_mime

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 114 88.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 15 11.6%
All colors 129 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
107 5 ...fuzz_mime.TestOneInput call site: 00005 xdg.Mime.get_type_by_name
2 113 ...fuzz_mime.TestOneInput call site: 00113 xdg.Mime.update_cache
2 116 ...fuzz_mime.TestOneInput call site: 00116 xdg.Mime.update_cache
2 126 ...fuzz_mime.TestOneInput call site: 00126 .str
1 123 ...fuzz_mime.TestOneInput call site: 00123 xdg.Mime.MagicDB.__init__

Runtime coverage analysis

Covered functions
31
Functions that are reachable but not covered
72
Reachable functions
72
Percentage of reachable functions covered
0.0%
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
/ 1
...fuzz_mime 14
xdg.Mime 63
xdg.BaseDirectory 2

Fuzzer: fuzz_desktop_entry

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 114 85.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 19 14.2%
All colors 133 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
82 49 ...fuzz_desktop_entry.TestOneInput call site: 00049 xdg.IniFile.IniFile.checkValue
26 19 xdg.DesktopEntry.DesktopEntry.parse call site: 00019 xdg.DesktopEntry.DesktopEntry.new
3 11 xdg.IconTheme.IconTheme.parse call site: 00011 xdg.IconTheme.IconTheme.parse
2 15 xdg.IconTheme.IconTheme.parse call site: 00015 os.path.dirname
1 7 xdg.DesktopEntry.DesktopEntry.__init__ call site: 00007 xdg.DesktopEntry.DesktopEntry.parse

Runtime coverage analysis

Covered functions
32
Functions that are reachable but not covered
46
Reachable functions
50
Percentage of reachable functions covered
8.0%
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
/ 1
...fuzz_desktop_entry 9
xdg.DesktopEntry 19
xdg.IconTheme 5
xdg.IniFile 23

Fuzzer: fuzz_menu

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 331 96.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 12 3.49%
All colors 343 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
165 3 ...fuzz_menu.TestOneInput call site: 00003 xdg.Menu.parse
160 182 xdg.DesktopEntry.DesktopEntry.parse call site: 00182 xdg.Menu.XMLMenuBuilder.parse_kde_legacy_dirs
5 176 xdg.IconTheme.IconTheme.parse call site: 00176 xdg.DesktopEntry.DesktopEntry.parse
1 170 xdg.DesktopEntry.DesktopEntry.__init__ call site: 00170 xdg.DesktopEntry.DesktopEntry.parse

Runtime coverage analysis

Covered functions
32
Functions that are reachable but not covered
170
Reachable functions
174
Percentage of reachable functions covered
2.3%
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
/ 1
...fuzz_menu 7
xdg.Menu 147
xdg.DesktopEntry 10
xdg.IconTheme 5
xdg.IniFile 14

Fuzzer: fuzz_icon

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 156 89.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 19 10.8%
All colors 175 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
140 23 ...fuzz_icon.TestOneInput call site: 00023 xdg.DesktopEntry.DesktopEntry.checkKey
7 167 ...fuzz_icon.TestOneInput call site: 00167 xdg.IconTheme.IconData.__init__
4 17 xdg.IconTheme.IconTheme.parse call site: 00017 xdg.DesktopEntry.DesktopEntry.parse
3 13 xdg.DesktopEntry.DesktopEntry.parse call site: 00013 xdg.IconTheme.IconTheme.parse
1 3 ...fuzz_icon.TestOneInput call site: 00003 f.write
1 7 xdg.IniFile.IniFile.__init__ call site: 00007 xdg.IconTheme.IconTheme.parse

Runtime coverage analysis

Covered functions
32
Functions that are reachable but not covered
52
Reachable functions
59
Percentage of reachable functions covered
11.86%
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
/ 1
...fuzz_icon 10
xdg.IconTheme 15
xdg.IniFile 34
xdg.DesktopEntry 14

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
lxml.doctestcompare.LXMLOutputChecker.output_difference lxml.doctestcompare 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 3 3 4 48 0 163 145
lxml.html._MethodFunc.__call__ lxml.html 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 0 5 5 28 0 100 94
xdg.IconTheme.getIconPath xdg.IconTheme 4 ['N/A', 'N/A', 'N/A', 'N/A'] 9 0 1 11 7 53 1 191 89
xdg.MenuEditor.MenuEditor.__addEntry xdg.MenuEditor 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 3 0 8 6 5 25 7 86 77
lxml.html.HtmlMixin.rewrite_links lxml.html 4 ['N/A', 'N/A', 'N/A', 'N/A'] 9 0 4 7 6 24 3 90 74
lxml.ElementInclude.include lxml.ElementInclude 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 1 6 5 23 0 81 69
lxml.html.soupparser._parse lxml.html.soupparser 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 0 6 5 23 3 78 63
lxml.html.formfill._fill_form lxml.html.formfill 2 ['N/A', 'N/A'] 3 0 2 7 6 18 2 66 47
lxml.html._diffcommand.main lxml.html._diffcommand 1 ['N/A'] 2 0 5 5 5 19 0 64 46
xdg.MenuEditor.MenuEditor.__saveEntries xdg.MenuEditor 2 ['N/A', 'N/A'] 4 0 3 4 5 16 2 59 44

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

Functions statically reachable by fuzzers
32.0%
172 / 533
Cyclomatic complexity statically reachable by fuzzers
38.0%
737 / 1960

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

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
[] []
[] []
lxml.html [] []
xml [] []
lxml.html.defs [] []
xdg.Exceptions [] []
xdg.Mime ['fuzz_mime'] []
lxml.html._diffcommand [] []
fcntl [] []
xdg.Menu ['fuzz_menu'] []
urllib [] []
urlparse [] []
lxml.ElementInclude [] []
...fuzz_mime ['fuzz_mime'] []
optparse [] []
xdg.BaseDirectory ['fuzz_mime'] []
cssselect [] []
re [] []
xdg.RecentFiles [] []
...fuzz_icon ['fuzz_icon'] []
subprocess [] []
doctest [] []
lxml.pyclasslookup [] []
warnings [] []
urllib2 [] []
ast [] []
lxml [] []
lxml.html._setmixin [] []
bs4 [] []
html5lib [] []
os [] []
fnmatch [] []
atheris [] []
xdg [] []
lxml.html.builder [] []
collections [] []
lxml.html.clean [] []
...fuzz_menu ['fuzz_menu'] []
functools [] []
BeautifulSoup [] []
html [] []
time [] []
lxml.isoschematron [] []
cgi [] []
xdg.MenuEditor [] []
lxml.doctestcompare [] []
sys [] []
lxml.html.formfill [] []
xdg.DesktopEntry ['fuzz_desktop_entry', 'fuzz_menu', 'fuzz_icon'] []
getpass [] []
lxml.etree [] []
locale [] []
lxml.html.diff [] []
xdg.IniFile ['fuzz_desktop_entry', 'fuzz_menu', 'fuzz_icon'] []
lxml.builder [] []
xdg.util [] []
lxml._elementpath [] []
tempfile [] []
lxml.sax [] []
lxml.html.soupparser [] []
lxml.html.ElementSoup [] []
xdg.Locale [] []
...fuzz_desktop_entry ['fuzz_desktop_entry'] []
lxml.cssselect [] []
lxml.html.usedoctest [] []
lxml.html._html5builder [] []
xdg.Config [] []
pkg_resources [] []
webbrowser [] []
stat [] []
io [] []
lxml.includes [] []
lxml.usedoctest [] []
lxml.html.html5parser [] []
shutil [] []
lxml.objectify [] []
imp [] []
xdg.IconTheme ['fuzz_desktop_entry', 'fuzz_menu', 'fuzz_icon'] []

Directories in report

Directory