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

Fuzzer details

Fuzzer: json_load_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 25 43.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 33 56.8%
All colors 58 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
30 30 4 :

['strncat', 'fputc', 'fputs', 'strlen']

30 30 loader_log call site: 00009 /src/vulkan-loader/loader/log.c:159
0 0 None 95 95 loader_log call site: 00008 /src/vulkan-loader/loader/log.c:99
0 0 None 30 30 loader_log call site: 00008 /src/vulkan-loader/loader/log.c:104
0 0 None 2 289 loader_get_json call site: 00038 /src/vulkan-loader/loader/cJSON.c:1274
0 0 None 2 139 loader_get_json call site: 00034 /src/vulkan-loader/loader/cJSON.c:1268
0 0 None 2 2 loader_calloc call site: 00035 /src/vulkan-loader/loader/allocation.c:56
0 0 None 0 0 loader_alloc call site: 00044 /src/vulkan-loader/loader/allocation.c:39
0 0 None 0 0 loader_free call site: 00029 /src/vulkan-loader/loader/allocation.c:76
0 0 None 0 0 cJSON_ParseWithOpts call site: 00046 /src/vulkan-loader/loader/cJSON.c:472

Runtime coverage analysis

Covered functions
30
Functions that are reachable but not covered
22
Reachable functions
43
Percentage of reachable functions covered
48.84%
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/json_load_fuzzer.c 1
cJSON.c 8
log.c 1
debug_utils.c 3
generated/vk_object_types.h 1
allocation.c 5

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
vkCreateInstance /src/vulkan-loader/loader/trampoline.c 3 ['struct.VkInstanceCreateInfo *', 'struct.VkAllocationCallbacks *', 'struct.VkInstance_T **'] 6 0 492 84 34 241 0 2013 1724
vkGetInstanceProcAddr /src/vulkan-loader/loader/trampoline.c 2 ['struct.VkInstance_T *', 'char *'] 5 0 79 19 8 40 0 842 696
vkGetDeviceProcAddr /src/vulkan-loader/loader/trampoline.c 2 ['struct.VkDevice_T *', 'char *'] 1 0 64 14 7 3 0 531 529
terminator_EnumeratePhysicalDeviceGroups /src/vulkan-loader/loader/loader.c 3 ['struct.VkInstance_T *', 'int *', 'struct.VkPhysicalDeviceGroupProperties *'] 5 0 1139 194 73 42 0 381 226
loader_gpa_instance_terminator /src/vulkan-loader/loader/loader.c 2 ['struct.VkInstance_T *', 'char *'] 5 0 227 42 20 33 0 321 114
vkEnumerateInstanceVersion /src/vulkan-loader/loader/trampoline.c 1 ['int *'] 6 0 259 39 15 171 0 1306 83
terminator_CreateInstance /src/vulkan-loader/loader/loader.c 3 ['struct.VkInstanceCreateInfo *', 'struct.VkAllocationCallbacks *', 'struct.VkInstance_T **'] 3 0 879 162 62 39 0 308 81
vkEnumeratePhysicalDeviceGroups /src/vulkan-loader/loader/trampoline.c 3 ['struct.VkInstance_T *', 'int *', 'struct.VkPhysicalDeviceGroupProperties *'] 3 0 88 17 7 27 0 222 74
terminator_DebugReportMessageEXT /src/vulkan-loader/loader/debug_utils.c 8 ['struct.VkInstance_T *', 'int ', 'int ', 'size_t ', 'size_t ', 'int ', 'char *', 'char *'] 2 0 67 12 5 8 0 77 69
terminator_EnumerateDeviceExtensionProperties /src/vulkan-loader/loader/loader.c 4 ['struct.VkPhysicalDevice_T *', 'char *', 'int *', 'struct.VkExtensionProperties *'] 3 0 545 92 36 28 0 222 42

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

Functions statically reachable by fuzzers
26.0%
260 / 989
Cyclomatic complexity statically reachable by fuzzers
64.0%
3841 / 5972

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
[] []
/src/vulkan-loader/loader/vk_loader_platform.h [] []
/src/vulkan-loader/loader/allocation.c ['json_load_fuzzer'] ['json_load_fuzzer']
/src/vulkan-loader/loader/unknown_function_handling.c [] []
/src/vulkan-loader/loader/extension_manual.c [] []
/src/vulkan-loader/loader/dev_ext_trampoline.c [] []
/src/vulkan-loader/loader/generated/vk_loader_extensions.c [] []
/src/vulkan-loader/loader/wsi.c [] []
/src/vulkan-loader/loader/loader_linux.c [] []
/src/vulkan-loader/loader/settings.c [] []
/src/vulkan-loader/loader/cJSON.c ['json_load_fuzzer'] ['json_load_fuzzer']
/src/vulkan-loader/loader/loader_environment.c [] []
/src/vulkan-loader/loader/loader.c [] []
/src/vulkan-loader/loader/gpa_helper.c [] []
/src/vulkan-loader/loader/log.c ['json_load_fuzzer'] ['json_load_fuzzer']
/src/json_load_fuzzer.c ['json_load_fuzzer'] ['json_load_fuzzer']
/src/vulkan-loader/loader/phys_dev_ext.c [] []
/src/vulkan-loader/loader/terminator.c [] []
/src/vulkan-loader/loader/trampoline.c [] []
/usr/include/stdlib.h [] []
/src/vulkan-loader/loader/loader.h [] []
/src/vulkan-loader/loader/debug_utils.c ['json_load_fuzzer'] []
/src/vulkan-loader/loader/generated/vk_object_types.h ['json_load_fuzzer'] []

Directories in report

Directory
/src/vulkan-loader/loader/generated/
/src/
/src/vulkan-loader/loader/
/usr/include/