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

Fuzzer details

Fuzzer: JsonJavaFuzzer

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 334 89.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 38 10.2%
All colors 372 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
138 173 [org.json.JSONObject].testValidity(java.lang.Object) call site: 00173
136 36 [org.json.JSONTokener].back() call site: 00036
21 334 [org.json.JSONTokener].nextValue(org.json.JSONParserConfiguration) call site: 00334
13 315 [org.json.JSONObject].stringToNumber(java.lang.String) call site: 00315
11 359 [org.json.JSONObject].put(java.lang.String,java.lang.Object) call site: 00359
4 1 [JsonJavaFuzzer].fuzzerTestOneInput(com.code_intelligence.jazzer.api.FuzzedDataProvider) call site: 00001
3 12 [org.json.JSONTokener].syntaxError(java.lang.String) call site: 00012
2 29 [org.json.JSONTokener].nextString(char,boolean) call site: 00029
1 7 [org.json.JSONTokener].next() call site: 00007
1 9 [org.json.JSONTokener].next() call site: 00009
1 16 [org.json.JSONTokener].nextSimpleValue(char,org.json.JSONParserConfiguration) call site: 00016
1 34 [org.json.JSONTokener].parsedUnquotedText(char,boolean) call site: 00034

Runtime coverage analysis

Covered functions
31
Functions that are reachable but not covered
2
Reachable functions
3
Percentage of reachable functions covered
33.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.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
JsonJavaFuzzer 1
org.json.JSONObject 37
org.json.JSONTokener 17
java.io.BufferedReader 2
org.json.JSONException 3
org.json.JSONParserConfiguration 3
org.json.JSONArray 16
org.json.StringBuilderWriter 6
java.io.PrintWriter 3
java.io.BufferedWriter 2
org.json.JSONObject$Null 2
org.json.JSONStringer 1
org.json.XML$1$1 3
org.json.JSONPointer 2
org.json.ParserConfiguration 2
org.json.XML$1 1
com.code_intelligence.jazzer.api.FuzzedDataProvider 1

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
[org.json.XML].parse(org.json.XMLTokener,org.json.JSONObject,java.lang.String,org.json.XMLParserConfiguration,int) org.json.XML 5 ['org.json.XMLTokener', 'org.json.JSONObject', 'java.lang.String', 'org.json.XMLParserConfiguration', 'int'] 7 0 246 104 37 131 7 214 214
[org.json.JSONML].toString(org.json.JSONObject) org.json.JSONML 1 ['org.json.JSONObject'] 11 0 76 24 11 110 2 150 113
[org.json.JSONML].parse(org.json.XMLTokener,boolean,org.json.JSONArray,org.json.JSONMLParserConfiguration,int) org.json.JSONML 5 ['org.json.XMLTokener', 'boolean', 'org.json.JSONArray', 'org.json.JSONMLParserConfiguration', 'int'] 6 0 190 91 31 95 14 154 66
[org.json.XML].toString(java.lang.Object,java.lang.String,org.json.XMLParserConfiguration,int,int) org.json.XML 5 ['java.lang.Object', 'java.lang.String', 'org.json.XMLParserConfiguration', 'int', 'int'] 4 0 173 63 26 37 7 83 55
[org.json.JSONObject].populateMap(java.lang.Object,java.util.Set) org.json.JSONObject 2 ['java.lang.Object', 'java.util.Set'] 10 0 66 28 14 125 1 129 50
[org.json.JSONTokener].nextValue(org.json.JSONParserConfiguration) org.json.JSONTokener 1 ['org.json.JSONParserConfiguration'] 11 0 23 6 1 121 1 141 49
[org.json.JSONArray].similar(java.lang.Object) org.json.JSONArray 1 ['java.lang.Object'] 7 0 59 28 9 58 2 68 36

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

Functions statically reachable by fuzzers
38.0%
61 / 159
Cyclomatic complexity statically reachable by fuzzers
85.0%
199 / 235

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

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
[org.json.JSONML].toString(org.json.JSONObject) 199 0 0.0% []
[org.json.XMLTokener].nextMeta() 143 0 0.0% []
[org.json.JSONArray].toList() 70 30 42.85% []
[org.json.JSONArray].iterator() 80 0 0.0% []
[org.json.JSONArray].length() 101 0 0.0% []
[org.json.JSONArray].put(java.lang.Object) 75 0 0.0% []
[org.json.JSONArray].write(java.io.Writer,int,int) 40 0 0.0% []
[org.json.JSONObject].removeLeadingZerosOfNumber(java.lang.String) 238 37 15.54% []
[org.json.JSONObject].opt(java.lang.String) 131 1 0.763% []
[org.json.JSONObject].getAnnotationDepth(java.lang.reflect.Method,java.lang.Class) 35 0 0.0% []
[org.json.JSONObject].quote(java.lang.String,java.io.Writer) 35 0 0.0% []
[org.json.JSONObject].remove(java.lang.String) 41 0 0.0% []
[org.json.JSONObject].writeValue(java.io.Writer,java.lang.Object,int,int) 34 0 0.0% []
[org.json.JSONObject].write(java.io.Writer,int,int) 60 0 0.0% []
[org.json.XML].toString(java.lang.Object,java.lang.String,int) 360 0 0.0% []
[org.json.HTTP].toString(org.json.JSONObject) 49 0 0.0% []
[org.json.JSONWriter].value(long) 115 0 0.0% []
[org.json.JSONPointer].toURIFragment() 66 0 0.0% []
[org.json.Cookie].toString(org.json.JSONObject) 81 0 0.0% []
[org.json.CDL].toString(org.json.JSONArray,org.json.JSONArray) 99 0 0.0% []

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
org.json.StringBuilderWriter ['JsonJavaFuzzer'] []
java.io.InputStream [] []
java.util.concurrent.Callable [] []
org.json.JSONStringer ['JsonJavaFuzzer'] []
java.io.File [] []
org.json.JSONPointer ['JsonJavaFuzzer'] []
org.json.JSONArray ['JsonJavaFuzzer'] []
java.lang.System [] []
java.util.concurrent.Executor [] []
org.json.XML$1 ['JsonJavaFuzzer'] []
org.json.Property [] []
org.json.XML [] []
java.io.OutputStream [] []
org.json.JSONObject$Null ['JsonJavaFuzzer'] []
org.json.JSONParserConfiguration ['JsonJavaFuzzer'] []
org.json.JSONTokener ['JsonJavaFuzzer'] []
java.io.BufferedWriter ['JsonJavaFuzzer'] []
org.json.JSONWriter [] []
JsonJavaFuzzer ['JsonJavaFuzzer'] []
org.json.XML$1$1 ['JsonJavaFuzzer'] []
org.json.HTTP [] []
org.json.HTTPTokener [] []
org.json.XMLTokener [] []
org.json.JSONObject ['JsonJavaFuzzer'] []
org.json.JSONMLParserConfiguration [] []
java.lang.Runtime [] []
org.json.JSONML [] []
org.json.CDL [] []
org.json.JSONPointer$Builder [] []
java.io.BufferedReader ['JsonJavaFuzzer'] []
org.json.ParserConfiguration ['JsonJavaFuzzer'] []
java.io.PrintWriter ['JsonJavaFuzzer'] []
org.json.XMLParserConfiguration [] []
java.lang.ProcessBuilder [] []
org.json.Cookie [] []
org.json.CookieList [] []

Directories in report

Directory