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

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 1243 99.8%
gold [1:9] 1 0.08%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 1 0.08%
All colors 1245 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
792 792 2 :

['file_magwarn', 'apprentice_load']

1079 1087 apprentice_1 call site: 00000 /src/file/src/apprentice.c:501
188 188 1 :

['apprentice_list']

188 188 apprentice_1 call site: 00000 /src/file/src/apprentice.c:521
103 103 1 :

['apprentice_compile']

880 880 apprentice_1 call site: 00000 /src/file/src/apprentice.c:492
72 72 4 :

['close', 'file_error', '__errno_location', 'apprentice_unmap']

72 72 apprentice_map call site: 00000 /src/file/src/apprentice.c:3384
57 57 1 :

['file_oomem']

72 72 apprentice_map call site: 00000 /src/file/src/apprentice.c:3335
55 55 1 :

['file_error']

55 55 apprentice_1 call site: 00000 /src/file/src/apprentice.c:485
55 55 1 :

['file_error']

55 55 check_buffer call site: 00000 /src/file/src/apprentice.c:3452
55 55 1 :

['file_error']

55 55 file_reset call site: 00002 /src/file/src/funcs.c:518
44 44 1 :

['mlist_free_one']

44 44 mlist_free call site: 00000 /src/file/src/apprentice.c:685
22 22 2 :

['get_default_magic', 'getenv']

22 22 magic_getpath call site: 00000 /src/file/src/magic.c:256
21 21 1 :

['byteswap']

21 21 check_buffer call site: 00000 /src/file/src/apprentice.c:3457
5 5 2 :

['magic_error', 'exit']

5 5 Environment::Environment(std::__1::basic_string ,std::__1::allocator >) call site: 00000 /src/magic_fuzzer.cc:28

Runtime coverage analysis

Covered functions
19
Functions that are reachable but not covered
293
Reachable functions
295
Percentage of reachable functions covered
0.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.
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 33
/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/strlcpy.c 1
/src/file/src/softmagic.c 29
/src/file/src/apprentice.c 10
/src/file/src/print.c 9
/src/file/src/der.c 6
/src/file/src/fmtcheck.c 4
/src/file/src/ascmagic.c 4

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 149 28.5%
gold [1:9] 1 0.19%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 371 71.2%
All colors 521 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
188 188 1 :

['apprentice_list']

188 188 apprentice_1 call site: 00498 /src/file/src/apprentice.c:521
104 324 7 :

['fstat', '__errno_location', 'mprotect', 'check_buffer', 'maxoff_t', 'file_error', 'mmap']

108 341 apprentice_map call site: 00457 /src/file/src/apprentice.c:3345
57 57 1 :

['file_oomem']

59 72 apprentice_map call site: 00454 /src/file/src/apprentice.c:3335
57 57 1 :

['file_oomem']

57 57 parse call site: 00136 /src/file/src/apprentice.c:2099
57 57 1 :

['file_oomem']

57 57 parse call site: 00137 /src/file/src/apprentice.c:2114
57 57 1 :

['file_oomem']

57 57 addentry call site: 00394 /src/file/src/apprentice.c:1315
57 57 1 :

['file_oomem']

57 57 coalesce_entries call site: 00431 /src/file/src/apprentice.c:1503
57 57 1 :

['file_oomem']

57 57 file_check_mem call site: 00122 /src/file/src/funcs.c:628
22 22 2 :

['get_default_magic', 'getenv']

22 22 magic_getpath call site: 00057 /src/file/src/magic.c:256
4 4 1 :

['__errno_location']

4 59 load_1 call site: 00112 /src/file/src/apprentice.c:1345
4 4 2 :

['close', 'abort']

4 4 fuzzer_get_tmpfile(unsignedcharconst*,unsignedlong) call site: 00000 /src/fuzzer_temp_file.h:47
2 465 5 :

['getvalue', 'file_mdump', 'strlcpy', 'check_format', '__ctype_b_loc']

2 495 parse call site: 00201 /src/file/src/apprentice.c:2382

Runtime coverage analysis

Covered functions
97
Functions that are reachable but not covered
78
Reachable functions
174
Percentage of reachable functions covered
55.17%
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 19
/src/file/src/print.c 9
/src/file/src/strlcpy.c 1
/src/file/src/cdf_time.c 4
/src/file/src/encoding.c 1
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3

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 449 33.5%
gold [1:9] 38 2.83%
yellow [10:29] 56 4.18%
greenyellow [30:49] 18 1.34%
lawngreen 50+ 778 58.1%
All colors 1339 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
3263 3428 11 :

['magic_file', 'bad_link', 'readlink', '__errno_location', 'stat', 'gnu_dev_major', 'handle_mime', 'lstat', 'file_error', 'gnu_dev_minor', 'strerror']

3263 3428 file_fsmagic call site: 00051 /src/file/src/fsmagic.c:117
792 792 2 :

['file_magwarn', 'apprentice_load']

1079 1087 apprentice_1 call site: 00000 /src/file/src/apprentice.c:501
197 197 3 :

['cdf_app_to_mime', 'cdf_tole2', 'cdf_file_catalog_info']

197 197 cdf_check_summary_info call site: 00388 /src/file/src/readcdf.c:405
188 188 1 :

['apprentice_list']

188 188 apprentice_1 call site: 00000 /src/file/src/apprentice.c:521
139 139 2 :

['file_mdump', 'mdebug']

141 2572 mget call site: 00955 /src/file/src/softmagic.c:1846
109 109 1 :

['file_pipe2file']

111 3203 file_tryelf call site: 00817 /src/file/src/readelf.c:1930
103 103 1 :

['apprentice_compile']

880 880 apprentice_1 call site: 00000 /src/file/src/apprentice.c:492
79 79 1 :

['file_magic_strength']

79 79 magiccheck call site: 01059 /src/file/src/softmagic.c:2509
67 89 2 :

['unreadable_info', 'sread']

69 2683 file_or_fd call site: 00051 /src/file/src/magic.c:496
57 57 1 :

['file_oomem']

72 72 apprentice_map call site: 00000 /src/file/src/apprentice.c:3335
57 57 1 :

['file_oomem']

57 57 file_ascmagic_with_encoding call site: 01257 /src/file/src/ascmagic.c:146
57 57 1 :

['file_oomem']

57 57 file_encoding call site: 00133 /src/file/src/encoding.c:153

Runtime coverage analysis

Covered functions
224
Functions that are reachable but not covered
117
Reachable functions
327
Percentage of reachable functions covered
64.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.
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 33
/src/file/src/fsmagic.c 3
/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/strlcpy.c 1
/src/file/src/softmagic.c 29
/src/file/src/apprentice.c 10
/src/file/src/print.c 9
/src/file/src/der.c 6
/src/file/src/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/file/src/compress.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/file/src/readelf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/cdf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/magic_fuzzer_loaddb.cc ['magic_fuzzer_loaddb'] ['magic_fuzzer_loaddb']
/src/file/src/ascmagic.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] []
/src/magic_fuzzer_fd.cc ['magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/magic.c ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/apprentice.c ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/strlcpy.c ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/readcdf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/fmtcheck.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/buffer.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/magic_fuzzer.cc ['magic_fuzzer'] ['magic_fuzzer']
/src/file/src/der.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/is_simh.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/fuzzer_temp_file.h ['magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/print.c ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/is_json.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/funcs.c ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/softmagic.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/is_csv.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/fsmagic.c ['magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/encoding.c ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/cdf_time.c ['magic_fuzzer', 'magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/file/src/is_tar.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']

Directories in report

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