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

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 147 30.6%
gold [1:9] 1 0.20%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 331 69.1%
All colors 479 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: 00457 /src/file/src/apprentice.c:517
103 331 7 :

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

107 348 apprentice_map call site: 00417 /src/file/src/apprentice.c:3293
57 57 1 :

['file_oomem']

59 72 apprentice_map call site: 00414 /src/file/src/apprentice.c:3283
57 57 1 :

['file_oomem']

57 57 parse call site: 00132 /src/file/src/apprentice.c:2063
57 57 1 :

['file_oomem']

57 57 parse call site: 00133 /src/file/src/apprentice.c:2078
57 57 1 :

['file_oomem']

57 57 addentry call site: 00359 /src/file/src/apprentice.c:1291
57 57 1 :

['file_oomem']

57 57 coalesce_entries call site: 00391 /src/file/src/apprentice.c:1477
57 57 1 :

['file_oomem']

57 57 file_check_mem call site: 00121 /src/file/src/funcs.c:627
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 61 load_1 call site: 00112 /src/file/src/apprentice.c:1321
4 4 2 :

['close', 'abort']

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

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

2 437 parse call site: 00193 /src/file/src/apprentice.c:2346

Runtime coverage analysis

Covered functions
93
Functions that are reachable but not covered
79
Reachable functions
171
Percentage of reachable functions covered
53.8%
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
magic_fuzzer_loaddb.cc 1
fuzzer_temp_file.h 5
filemagic.c 7
fileapprentice.c 53
filefuncs.c 17
fileprint.c 7
filecdf_time.c 4
filestrlcpy.c 1
fileencoding.c 1
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3

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 471 44.1%
gold [1:9] 10 0.93%
yellow [10:29] 23 2.15%
greenyellow [30:49] 12 1.12%
lawngreen 50+ 550 51.5%
All colors 1066 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
744 744 2 :

['apprentice_load', 'file_magwarn']

1031 1039 apprentice_1 call site: 00000 /src/file/src/apprentice.c:497
197 197 3 :

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

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

['apprentice_list']

188 188 apprentice_1 call site: 00000 /src/file/src/apprentice.c:517
136 136 2 :

['file_mdump', 'mdebug']

138 2567 mget call site: 00736 /src/file/src/softmagic.c:1808
103 103 1 :

['apprentice_compile']

835 835 apprentice_1 call site: 00000 /src/file/src/apprentice.c:488
79 79 1 :

['file_magic_strength']

79 79 magiccheck call site: 00832 /src/file/src/softmagic.c:2471
61 71 4 :

['strlen', 'file_magerror', 'file_printable', 'regerror']

61 71 file_regcomp call site: 00789 /src/file/src/funcs.c:741
57 64 2 :

['buffer_init', 'file_magerror']

57 64 msetoffset call site: 00619 /src/file/src/softmagic.c:1528
57 57 1 :

['file_oomem']

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

['file_oomem']

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

['file_oomem']

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

['file_oomem']

57 57 file_getbuffer call site: 01062 /src/file/src/funcs.c:561

Runtime coverage analysis

Covered functions
192
Functions that are reachable but not covered
141
Reachable functions
314
Percentage of reachable functions covered
55.1%
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
magic_fuzzer.cc 1
filemagic.c 1
filefuncs.c 33
filebuffer.c 3
fileencoding.c 10
filecompress.c 21
fileis_tar.c 3
fileis_json.c 11
fileis_csv.c 3
fileis_simh.c 4
filereadcdf.c 9
filecdf.c 40
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
filecdf_time.c 5
filereadelf.c 9
filestrlcpy.c 1
filesoftmagic.c 29
fileapprentice.c 10
fileprint.c 7
fileder.c 6
filefmtcheck.c 4
fileascmagic.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 438 38.2%
gold [1:9] 23 2.00%
yellow [10:29] 37 3.22%
greenyellow [30:49] 16 1.39%
lawngreen 50+ 632 55.1%
All colors 1146 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
3269 3440 11 :

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

3269 3440 file_fsmagic call site: 00051 /src/file/src/fsmagic.c:117
744 744 2 :

['apprentice_load', 'file_magwarn']

1031 1039 apprentice_1 call site: 00000 /src/file/src/apprentice.c:497
197 197 3 :

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

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

['apprentice_list']

188 188 apprentice_1 call site: 00000 /src/file/src/apprentice.c:517
136 136 2 :

['file_mdump', 'mdebug']

138 2567 mget call site: 00808 /src/file/src/softmagic.c:1808
109 109 1 :

['file_pipe2file']

111 3051 file_tryelf call site: 00682 /src/file/src/readelf.c:1851
103 103 1 :

['apprentice_compile']

835 835 apprentice_1 call site: 00000 /src/file/src/apprentice.c:488
79 79 1 :

['file_magic_strength']

79 79 magiccheck call site: 00903 /src/file/src/softmagic.c:2471
67 89 2 :

['unreadable_info', 'sread']

69 2738 file_or_fd call site: 00051 /src/file/src/magic.c:496
61 71 4 :

['strlen', 'file_magerror', 'file_printable', 'regerror']

61 71 file_regcomp call site: 00860 /src/file/src/funcs.c:741
57 57 1 :

['file_oomem']

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

['file_oomem']

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

Runtime coverage analysis

Covered functions
221
Functions that are reachable but not covered
139
Reachable functions
346
Percentage of reachable functions covered
59.83%
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
magic_fuzzer_fd.cc 1
fuzzer_temp_file.h 5
filemagic.c 5
filefuncs.c 32
filefsmagic.c 3
filecompress.c 21
filebuffer.c 3
fileencoding.c 10
fileis_tar.c 3
fileis_json.c 11
fileis_csv.c 3
fileis_simh.c 4
filereadcdf.c 9
filecdf.c 40
/usr/include/x86_64-linux-gnu/bits/byteswap.h 3
filecdf_time.c 5
filereadelf.c 9
filestrlcpy.c 1
filesoftmagic.c 29
fileapprentice.c 10
fileprint.c 7
fileder.c 6
filefmtcheck.c 4
fileascmagic.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_loaddb.cc ['magic_fuzzer_loaddb'] ['magic_fuzzer_loaddb']
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['magic_fuzzer_loaddb', '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/fmtcheck.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/cdf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/strlcpy.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/is_csv.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/magic_fuzzer_fd.cc ['magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/fsmagic.c ['magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/print.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/der.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/ascmagic.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']
/src/file/src/magic.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/readcdf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/is_simh.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/fuzzer_temp_file.h ['magic_fuzzer_loaddb', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer_fd']
/src/magic_fuzzer.cc ['magic_fuzzer'] ['magic_fuzzer']
/src/file/src/softmagic.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/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/readelf.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_fd']
/src/file/src/encoding.c ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer_loaddb', 'magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/buffer.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']
/src/file/src/is_tar.c ['magic_fuzzer', 'magic_fuzzer_fd'] ['magic_fuzzer', 'magic_fuzzer_fd']

Directories in report

Directory
/src/file/src/
/src/
/usr/include/x86_64-linux-gnu/bits/