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

Fuzzer details

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 81.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 35 18.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
108 71 xdg.IniFile.IniFile.get call site: 00071 xdg.DesktopEntry.DesktopEntry.checkKey
19 36 ...fuzz_icon.TestOneInput call site: 00036 xdg.IconTheme.IconTheme.checkGroup
7 63 xdg.IniFile.IniFile.getList call site: 00063 xdg.IniFile.IniFile.__getBoolean
7 183 ...fuzz_icon.TestOneInput call site: 00183 xdg.IconTheme.IconData.__init__
5 29 xdg.DesktopEntry.DesktopEntry.parse call site: 00029 xdg.IconTheme.IconTheme.parse
4 58 xdg.IniFile.IniFile.getList call site: 00058 re.search
3 7 xdg.IniFile.IniFile.__init__ call site: 00007 xdg.IconTheme.IconData.parse
2 26 xdg.IniFile.IniFile.parse call site: 00026 os.path.dirname
1 3 ...fuzz_icon.TestOneInput call site: 00003 f.write

Runtime coverage analysis

Covered functions
116
Functions that are reachable but not covered
61
Reachable functions
71
Percentage of reachable functions covered
14.08%
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_icon 10
xdg.IconTheme 16
xdg.IniFile 47
xdg.DesktopEntry 15

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 166 46.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 189 53.2%
All colors 355 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
22 313 xdg.Menu.Menu.sort call site: 00313 xdg.Menu.Menu.merge_inline
18 68 xdg.Menu._ast_const call site: 00068 ast.NameConstant
17 240 xdg.Menu.MenuEntryCache.get_menu_entries call site: 00240 xdg.Menu.Rule.fromFilename
14 129 xdg.Menu._to_bool call site: 00129 xdg.Menu._to_bool
11 337 xdg.Menu.Menu.sort call site: 00337 entry.Directory.DesktopEntry.getNoDisplay
10 56 xdg.Menu.XMLMenuBuilder.parse_rule call site: 00056 xdg.Menu.XMLMenuBuilder.parse_rule_node
10 194 xdg.DesktopEntry.DesktopEntry.parse call site: 00194 xdg.DesktopEntry.DesktopEntry.new
7 9 xdg.Menu.XMLMenuBuilder.parse call site: 00009 xdg.Menu._get_menu_file_path
7 94 xdg.Menu.XMLMenuBuilder.parse_node call site: 00094 xdg.Menu.XMLMenuBuilder.parse_merge_file
7 212 xdg.IniFile.IniFile.getList call site: 00212 xdg.IniFile.IniFile.__getBoolean
6 223 xdg.Menu.MenuEntry.setAttributes call site: 00223 xdg.Menu.MenuEntry.__setFilename
4 184 xdg.IconTheme.IconTheme.parse call site: 00184 xdg.IconTheme.IconTheme.parse

Runtime coverage analysis

Covered functions
117
Functions that are reachable but not covered
133
Reachable functions
182
Percentage of reachable functions covered
26.92%
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 11
xdg.IconTheme 6
xdg.IniFile 22

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 64 49.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 65 50.3%
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
35 45 xdg.Mime.MagicDB.merge_file call site: 00045 xdg.Mime.MagicMatchAny.from_file
7 94 xdg.Mime.get_type2 call site: 00094 xdg.Mime._get_type_by_stat
6 31 xdg.Mime.GlobDB.finalise call site: 00031 mtype.canonical
3 90 xdg.Mime.get_type2 call site: 00090 xdg.Mime.get_type_by_name
2 13 xdg.BaseDirectory.load_data_paths call site: 00013 .open
2 82 xdg.Mime.MagicDB.finalise call site: 00082 rule.maxlen
2 86 xdg.Mime._cache_database call site: 00086 .open
2 126 ...fuzz_mime.TestOneInput call site: 00126 .str
1 19 xdg.Mime._cache_database call site: 00019 xdg.Mime.GlobDB.merge_file
1 41 xdg.Mime._cache_database call site: 00041 xdg.Mime.MagicDB.merge_file
1 103 xdg.Mime.get_type2 call site: 00103 .len
1 111 xdg.Mime._is_text call site: 00111 .any

Runtime coverage analysis

Covered functions
116
Functions that are reachable but not covered
56
Reachable functions
72
Percentage of reachable functions covered
22.22%
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_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 109 75.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 36 24.8%
All colors 145 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 61 ...fuzz_desktop_entry.TestOneInput call site: 00061 xdg.IniFile.IniFile.checkValue
10 31 xdg.DesktopEntry.DesktopEntry.parse call site: 00031 xdg.DesktopEntry.DesktopEntry.new
7 49 xdg.IniFile.IniFile.getList call site: 00049 xdg.IniFile.IniFile.__getBoolean
4 44 xdg.IniFile.IniFile.getList call site: 00044 re.search
3 11 xdg.IconTheme.IconTheme.parse call site: 00011 xdg.IconTheme.IconTheme.parse
2 26 xdg.IconTheme.IconTheme.parse call site: 00026 os.path.dirname
1 23 xdg.IniFile.IniFile.parse call site: 00023 xdg.DesktopEntry.DesktopEntry.parse

Runtime coverage analysis

Covered functions
117
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.
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_desktop_entry 9
xdg.DesktopEntry 20
xdg.IconTheme 6
xdg.IniFile 31

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'] 2 0 3 3 4 48 0 163 145
lxml.html._MethodFunc.__call__ lxml.html 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 0 5 5 29 0 103 97
lxml.html.HtmlMixin.rewrite_links lxml.html 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 4 7 6 25 3 93 77
xdg.MenuEditor.MenuEditor.__addEntry xdg.MenuEditor 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 2 0 8 6 5 24 7 83 74
xdg.IconTheme.getIconPath xdg.IconTheme 4 ['N/A', 'N/A', 'N/A', 'N/A'] 5 0 1 11 7 53 1 191 67
lxml.ElementInclude.include lxml.ElementInclude 4 ['N/A', 'N/A', 'N/A', 'N/A'] 1 0 1 6 5 23 0 81 66
lxml.html.soupparser._parse lxml.html.soupparser 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 0 6 5 23 3 78 63
lxml.html.formfill._fill_form lxml.html.formfill 2 ['N/A', 'N/A'] 2 0 2 7 6 18 2 66 47
lxml.html._diffcommand.main lxml.html._diffcommand 1 ['N/A'] 1 0 5 5 5 19 0 64 46
xdg.MenuEditor.MenuEditor.__saveEntries xdg.MenuEditor 2 ['N/A', 'N/A'] 2 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%
173 / 533
Cyclomatic complexity statically reachable by fuzzers
38.0%
740 / 1962

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

Directories in report

Directory