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: magic_fuzzer_loaddb

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 157 29.3%
gold [1:9] 1 0.18%
yellow [10:29] 1 0.18%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 376 70.2%
All colors 535 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
33 470 apprentice_map call site: 00470 check_buffer
15 98 apprentice_load call site: 00098 load_1
10 58 file_apprentice call site: 00058 get_default_magic
10 508 add_mlist call site: 00508 apprentice_list
6 429 apprentice_magic_strength_1 call site: 00429 fprintf
5 414 set_test_type call site: 00414 fprintf
4 72 file_apprentice call site: 00072 file_oomem
4 79 mlist_free_one call site: 00079 file_regfree
3 9 fuzzer_get_tmpfile(unsigned char const*, unsigned long) call site: 00009 perror
3 13 fuzzer_get_tmpfile(unsigned char const*, unsigned long) call site: 00013 close
3 42 file_checkfmt call site: 00042 file_error
3 49 file_vprintf call site: 00049 file_error

Runtime coverage analysis

Covered functions
101
Functions that are reachable but not covered
78
Reachable functions
178
Percentage of reachable functions covered
56.18%
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/magic_fuzzer_loaddb.cc 1
/src/fuzzer_temp_file.h 5
/src/file/src/magic.c 7
/src/file/src/apprentice.c 53
/src/file/src/funcs.c 22
/src/file/src/./file.h 1
/src/file/src/print.c 9
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
/src/file/src/../src/missing/strlcpy.c 1
/src/file/src/cdf_time.c 4
/src/file/src/encoding.c 1

Fuzzer: magic_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 692 53.9%
gold [1:9] 11 0.85%
yellow [10:29] 15 1.17%
greenyellow [30:49] 20 1.56%
lawngreen 50+ 544 42.4%
All colors 1282 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
170 577 file_printable call site: 00577 doshn
136 440 file_buffer call site: 00440 file_tryelf
46 766 mcopy call site: 00766 file_mdump
34 359 cdf_read_property_info call site: 00359 cdf_file_property_info
27 331 cdf_read_property_info call site: 00331 cdf_get_property_info_pos
26 1011 magiccheck call site: 01011 file_magic_strength
25 398 cdf_timestamp_to_timespec call site: 00398 cdf_file_catalog_info
16 819 file_fmtdatetime call site: 00819 file_fmtdatetime
12 260 cdf_read_dir call site: 00260 cdf_swap_dir
12 953 check_regex call site: 00953 file_magwarn
11 840 file_fmttime call site: 00840 file_fmtnum
8 101 writechild call site: 00101 swrite

Runtime coverage analysis

Covered functions
187
Functions that are reachable but not covered
131
Reachable functions
298
Percentage of reachable functions covered
56.04%
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/magic_fuzzer.cc 1
/src/file/src/magic.c 1
/src/file/src/funcs.c 35
/src/file/src/buffer.c 3
/src/file/src/encoding.c 10
/src/file/src/compress.c 16
/src/file/src/is_tar.c 3
/src/file/src/is_json.c 11
/src/file/src/is_csv.c 3
/src/file/src/is_simh.c 4
/src/file/src/readcdf.c 9
/src/file/src/cdf.c 40
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
/src/file/src/cdf_time.c 5
/src/file/src/readelf.c 21
/src/file/src/../src/missing/strlcpy.c 1
/src/file/src/softmagic.c 30
/src/file/src/apprentice.c 10
/src/file/src/print.c 9
/src/file/src/der.c 6
/src/file/src/../src/missing/fmtcheck.c 4
/src/file/src/ascmagic.c 4

Fuzzer: magic_fuzzer_fd

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 526 38.1%
gold [1:9] 41 2.97%
yellow [10:29] 41 2.97%
greenyellow [30:49] 16 1.16%
lawngreen 50+ 754 54.7%
All colors 1378 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
49 52 file_or_fd call site: 00052 magic_file
46 844 mcopy call site: 00844 file_mdump
34 438 cdf_read_property_info call site: 00438 cdf_file_property_info
34 521 file_tryelf call site: 00521 file_pipe2file
27 410 cdf_read_property_info call site: 00410 cdf_get_property_info_pos
26 1089 magiccheck call site: 01089 file_magic_strength
24 477 cdf_timestamp_to_timespec call site: 00477 cdf_file_catalog_info
16 897 file_fmtdatetime call site: 00897 file_fmtdatetime
12 183 uncompressbuf call site: 00183 writechild
12 339 cdf_read_dir call site: 00339 cdf_swap_dir
12 1031 check_regex call site: 01031 file_magwarn
11 918 file_fmttime call site: 00918 file_fmtnum

Runtime coverage analysis

Covered functions
218
Functions that are reachable but not covered
128
Reachable functions
331
Percentage of reachable functions covered
61.33%
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/magic_fuzzer_fd.cc 1
/src/fuzzer_temp_file.h 5
/src/file/src/magic.c 5
/src/file/src/funcs.c 35
/src/file/src/fsmagic.c 4
/src/file/src/compress.c 16
/src/file/src/buffer.c 3
/src/file/src/encoding.c 10
/src/file/src/is_tar.c 3
/src/file/src/is_json.c 11
/src/file/src/is_csv.c 3
/src/file/src/is_simh.c 4
/src/file/src/readcdf.c 9
/src/file/src/cdf.c 40
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
/src/file/src/cdf_time.c 5
/src/file/src/readelf.c 21
/src/file/src/../src/missing/strlcpy.c 1
/src/file/src/softmagic.c 30
/src/file/src/apprentice.c 10
/src/file/src/print.c 9
/src/file/src/der.c 6
/src/file/src/../src/missing/fmtcheck.c 4
/src/file/src/ascmagic.c 4

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/magic_fuzzer_fd.cc ['magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/is_simh.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] []
/src/file/src/magic.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/is_tar.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/readcdf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/magic_fuzzer_loaddb.cc ['magic_fuzzer_loaddb'] ['magic_fuzzer_loaddb']
/src/file/src/cdf_time.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/compress.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/../src/missing/fmtcheck.c ['magic_fuzzer', 'magic_fuzzer_fd'] []
/src/file/src/ascmagic.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/buffer.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/is_json.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/fsmagic.c ['magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/../src/missing/strlcpy.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] []
/src/file/src/readelf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/softmagic.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/is_csv.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/magic_fuzzer.cc ['magic_fuzzer'] ['magic_fuzzer']
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/file/src/print.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/./file.h ['magic_fuzzer_loaddb'] []
/src/file/src/encoding.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/fuzzer_temp_file.h ['magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/der.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/funcs.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/cdf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/apprentice.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']

Directories in report

Directory
/src/
/usr/local/bin/../include/c++/v1/
/src/file/src/../src/missing/
/src/file/src/./
/usr/include/x86_64-linux-gnu/bits/
/src/file/src/