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

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined 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

Fuzzer details

Fuzzer: xlsx_fuzzer

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 2671 74.3%
gold [1:9] 6 0.16%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 916 25.4%
All colors 3593 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
353 353 1 :

['worksheet_write_blank']

353 353 worksheet_write_string call site: 00309 /src/libxlsxwriter/src/worksheet.c:7945
196 344 14 :

['_write_formula_str_cell', 'free', 'lxw_new_attribute_str', '_write_error_cell', 'lxw_new_attribute_int', 'lxw_xml_empty_tag', '_write_inline_string_cell', 'lxw_xml_start_tag', 'lxw_new_attribute_dbl', '_write_formula_num_cell', '_write_inline_rich_string_cell', 'lxw_xml_end_tag', '_write_boolean_cell', '_write_array_formula_num_cell']

196 344 _write_cell call site: 00370 /src/libxlsxwriter/src/worksheet.c:4646
191 191 1 :

['_add_buffer_to_zip']

191 191 _add_to_zip call site: 00959 /src/libxlsxwriter/src/packager.c:2155
154 154 2 :

['fill_fopen_filefunc', 'zipOpen2']

154 157 lxw_packager_new call site: 00800 /src/libxlsxwriter/src/packager.c:209
131 131 1 :

['LoadCentralDirectoryRecord']

131 131 zipOpen3 call site: 00807 /src/libxlsxwriter/third_party/minizip/zip.c:859
104 124 3 :

['lxw_xml_end_tag', '_worksheet_write_ext_list_data_bars', 'lxw_xml_start_tag']

104 124 _worksheet_write_ext_list call site: 01793 /src/libxlsxwriter/src/worksheet.c:7188
88 108 4 :

['_write_alignment', 'lxw_xml_end_tag', 'lxw_xml_start_tag', '_write_protection']

88 108 _write_xf call site: 03117 /src/libxlsxwriter/src/styles.c:1235
84 284 6 :

['_write_num_fmt', 'lxw_xml_start_tag', '_write_fill', 'lxw_xml_end_tag', '_write_border', '_write_font']

84 284 _write_dxfs call site: 03156 /src/libxlsxwriter/src/styles.c:1352
61 87 5 :

['_worksheet_write_data_validation', 'free', 'lxw_xml_start_tag', 'lxw_xml_end_tag', 'lxw_new_attribute_int']

61 87 _worksheet_write_data_validations call site: 01628 /src/libxlsxwriter/src/worksheet.c:5982
50 50 1 :

['_write_comment_font']

50 54 _write_fonts call site: 02965 /src/libxlsxwriter/src/styles.c:614
48 88 5 :

['_write_hyperlink_protection', 'lxw_new_attribute_str', '_write_hyperlink_alignment', 'lxw_xml_start_tag', 'lxw_xml_end_tag']

48 88 _write_style_xf call site: 03083 /src/libxlsxwriter/src/styles.c:980
28 32 3 :

['Write_Zip64EndOfCentralDirectoryLocator', 'call_ztell64', 'Write_Zip64EndOfCentralDirectoryRecord']

28 63 zipClose call site: 01065 /src/libxlsxwriter/third_party/minizip/zip.c:1875

Runtime coverage analysis

Covered functions
322
Functions that are reachable but not covered
517
Reachable functions
835
Percentage of reachable functions covered
38.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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/libxlsxwriter/dev/fuzzing/xlsx_fuzzer.cpp 2
/src/libxlsxwriter/src/workbook.c 63
/src/libxlsxwriter/src/utility.c 18
/src/libxlsxwriter/src/shared_strings.c 13
/src/libxlsxwriter/src/hash_table.c 5
/src/libxlsxwriter/src/format.c 9
/src/libxlsxwriter/src/chartsheet.c 11
/src/libxlsxwriter/src/worksheet.c 190
/src/libxlsxwriter/src/drawing.c 49
/src/libxlsxwriter/src/chart.c 72
/src/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c 5
/src/libxlsxwriter/src/xmlwriter.c 16
/src/libxlsxwriter/src/packager.c 40
/src/libxlsxwriter/third_party/minizip/zip.c 30
/src/libxlsxwriter/third_party/minizip/ioapi.c 6
/src/libxlsxwriter/src/content_types.c 22
/src/libxlsxwriter/src/relationships.c 12
/src/libxlsxwriter/src/vml.c 43
/src/libxlsxwriter/src/comment.c 27
/src/libxlsxwriter/src/table.c 9
/src/libxlsxwriter/src/custom.c 11
/src/libxlsxwriter/src/theme.c 3
/src/libxlsxwriter/src/styles.c 45
/src/libxlsxwriter/src/core.c 16
/src/libxlsxwriter/src/metadata.c 17
/src/libxlsxwriter/src/rich_value.c 8
/src/libxlsxwriter/src/rich_value_rel.c 6
/src/libxlsxwriter/src/rich_value_types.c 8
/src/libxlsxwriter/src/rich_value_structure.c 7
/src/libxlsxwriter/src/app.c 24

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
_chart_write_line_chart /src/libxlsxwriter/src/chart.c 1 ['N/A'] 14 0 65 7 3 110 0 571 305
_chart_write_plot_area /src/libxlsxwriter/src/chart.c 1 ['N/A'] 14 0 53 3 2 95 0 494 190
worksheet_conditional_format_cell /src/libxlsxwriter/src/worksheet.c 4 ['N/A', 'int', 'short', 'N/A'] 5 0 30 3 2 35 0 233 163
worksheet_embed_image_buffer /src/libxlsxwriter/src/worksheet.c 5 ['N/A', 'int', 'short', 'N/A', 'size_t'] 13 0 32 3 2 112 0 653 157
worksheet_add_table /src/libxlsxwriter/src/worksheet.c 6 ['N/A', 'int', 'short', 'int', 'short', 'N/A'] 11 0 415 50 18 89 0 541 100
workbook_add_chart /src/libxlsxwriter/src/workbook.c 2 ['N/A', 'char'] 6 0 55 8 3 24 0 126 86
worksheet_data_validation_cell /src/libxlsxwriter/src/worksheet.c 4 ['N/A', 'int', 'short', 'N/A'] 5 0 30 3 2 17 0 130 81
worksheet_write_comment /src/libxlsxwriter/src/worksheet.c 4 ['N/A', 'int', 'short', 'N/A'] 9 0 28 3 2 66 0 407 49
workbook_add_chartsheet /src/libxlsxwriter/src/workbook.c 2 ['N/A', 'N/A'] 8 0 264 30 8 77 0 703 46
chartsheet_set_footer /src/libxlsxwriter/src/chartsheet.c 2 ['N/A', 'N/A'] 7 0 20 3 2 30 0 162 40

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

Functions statically reachable by fuzzers
74.0%
962 / 1301
Cyclomatic complexity statically reachable by fuzzers
83.0%
6286 / 7566

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 Runtime reached by Fuzzers Combined 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

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
lxw_worksheet_names_RB_REMOVE 65 18 27.69% ['xlsx_fuzzer']
lxw_worksheet_names_RB_REMOVE_COLOR 76 8 10.52% ['xlsx_fuzzer']
lxw_worksheet_names_RB_INSERT_COLOR 42 7 16.66% ['xlsx_fuzzer']
lxw_table_rows_RB_REMOVE 65 24 36.92% ['xlsx_fuzzer']
lxw_table_rows_RB_REMOVE_COLOR 76 35 46.05% ['xlsx_fuzzer']
lxw_table_cells_RB_REMOVE 65 24 36.92% ['xlsx_fuzzer']
lxw_table_cells_RB_REMOVE_COLOR 76 35 46.05% ['xlsx_fuzzer']
lxw_table_cells_RB_INSERT_COLOR 42 22 52.38% ['xlsx_fuzzer']
lxw_table_rows_RB_INSERT_COLOR 42 22 52.38% ['xlsx_fuzzer']
lxw_insert_hash_element 46 20 43.47% ['xlsx_fuzzer']
_write_vml_files 86 18 20.93% ['xlsx_fuzzer']
_write_comment_files 40 18 45.0% ['xlsx_fuzzer']
_write_table_files 44 19 43.18% ['xlsx_fuzzer']
_write_worksheet_rels_file 70 26 37.14% ['xlsx_fuzzer']
_write_chartsheet_rels_file 44 17 38.63% ['xlsx_fuzzer']
_write_drawing_rels_file 39 19 48.71% ['xlsx_fuzzer']
_write_image_files 71 18 25.35% ['xlsx_fuzzer']
_write_rich_value_rels_file 46 14 30.43% ['xlsx_fuzzer']
workbook_close 108 49 45.37% ['xlsx_fuzzer']
_prepare_num_formats 59 16 27.11% ['xlsx_fuzzer']
_prepare_vml 42 16 38.09% ['xlsx_fuzzer']
_prepare_defined_names 100 17 17.0% ['xlsx_fuzzer']
_prepare_drawings 160 27 16.87% ['xlsx_fuzzer']
_write_cell 77 16 20.77% ['xlsx_fuzzer']
_worksheet_write_sheet_protection 45 5 11.11% ['xlsx_fuzzer']
_worksheet_write_page_setup 33 6 18.18% ['xlsx_fuzzer']
_worksheet_write_hyperlinks 48 6 12.5% ['xlsx_fuzzer']
_worksheet_write_ignored_errors 42 3 7.142% ['xlsx_fuzzer']
zipWriteInFileInZip 53 29 54.71% ['xlsx_fuzzer']

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
[] []
/src/libxlsxwriter/src/rich_value_rel.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/packager.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/rich_value_structure.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/table.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/utility.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/third_party/minizip/ioapi.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/shared_strings.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/rich_value.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/chartsheet.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/dev/fuzzing/xlsx_fuzzer.cpp ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/app.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/vml.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/third_party/md5/md5.c [] []
/src/libxlsxwriter/src/format.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/drawing.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/chart.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/comment.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/third_party/minizip/zip.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/worksheet.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/custom.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/rich_value_types.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/theme.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/content_types.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/core.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/libxlsxwriter/src/styles.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/relationships.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/metadata.c ['xlsx_fuzzer'] []
/src/libxlsxwriter/src/xmlwriter.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/hash_table.c ['xlsx_fuzzer'] ['xlsx_fuzzer']
/src/libxlsxwriter/src/workbook.c ['xlsx_fuzzer'] ['xlsx_fuzzer']

Directories in report

Directory
/src/libxlsxwriter/third_party/md5/
/usr/local/bin/../include/c++/v1/
/src/libxlsxwriter/third_party/minizip/
/src/libxlsxwriter/dev/fuzzing/
/src/libxlsxwriter/src/
/src/libxlsxwriter/third_party/tmpfileplus/