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

Fuzzer details

Fuzzer: fuzz_mms_decode

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 9 10.9%
gold [1:9] 1 1.21%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 72 87.8%
All colors 82 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
0 17 1 :

['MmsValue_delete']

0 17 MmsValue_decodeMmsData call site: 00017 /src/libiec61850/src/mms/iso_mms/server/mms_access_result.c:216
0 2 1 :

['Memory_free']

0 2 Asn1PrimitiveValue_create call site: 00037 /src/libiec61850/src/mms/asn1/asn1_ber_primitive_value.c:39
0 2 1 :

['Memory_free']

0 2 MmsValue_newBitString call site: 00029 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:369
0 2 1 :

['Memory_free']

0 2 MmsValue_newInteger call site: 00039 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:1413
0 2 1 :

['Memory_free']

0 2 MmsValue_newUnsigned call site: 00045 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:1435
0 2 1 :

['Memory_free']

0 2 MmsValue_newOctetString call site: 00056 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:1472
0 2 1 :

['Memory_free']

0 2 MmsValue_createEmptyArray call site: 00012 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:2044
0 0 None 0 17 MmsValue_decodeMmsData call site: 00001 /src/libiec61850/src/mms/iso_mms/server/mms_access_result.c:162
0 0 None 0 17 MmsValue_decodeMmsData call site: 00016 /src/libiec61850/src/mms/iso_mms/server/mms_access_result.c:201
0 0 None 0 0 MmsValue_newDataAccessError call site: 00021 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:348
0 0 None 0 0 MmsValue_newBitString call site: 00026 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:362
0 0 None 0 0 MmsValue_delete call site: 00071 /src/libiec61850/src/mms/iso_mms/common/mms_value.c:1315

Runtime coverage analysis

Covered functions
36
Functions that are reachable but not covered
3
Reachable functions
39
Percentage of reachable functions covered
92.31%
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
build/../fuzz/fuzz_mms_decode.c 1
src/mms/iso_mms/server/mms_access_result.c 2
src/mms/asn1/ber_decode.c 7
src/mms/iso_mms/common/mms_value.c 18
hal/memory/lib_memory.c 4
src/mms/asn1/ber_integer.c 2
src/mms/asn1/asn1_ber_primitive_value.c 2
src/common/string_utilities.c 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
MmsValue_encodeMmsData /src/libiec61850/src/mms/iso_mms/server/mms_access_result.c 4 ['struct.sMmsValue *', 'char *', 'int ', 'N/A'] 4 0 457 60 15 21 3 103 103
MmsValue_printToBuffer /src/libiec61850/src/mms/iso_mms/common/mms_value.c 3 ['struct.sMmsValue *', 'char *', 'int '] 3 0 463 64 15 25 1 98 85
MmsValue_update /src/libiec61850/src/mms/iso_mms/common/mms_value.c 2 ['struct.sMmsValue *', 'struct.sMmsValue *'] 4 0 459 58 15 15 2 76 52
MmsValue_equals /src/libiec61850/src/mms/iso_mms/common/mms_value.c 2 ['struct.sMmsValue *', 'struct.sMmsValue *'] 2 0 465 70 21 5 1 52 50
MmsVariableSpecification_getMaxEncodedSize /src/libiec61850/src/mms/iso_mms/server/mms_access_result.c 1 ['struct.sMmsVariableSpecification *'] 2 0 187 18 19 5 2 50 41
MmsValue_getMaxEncodedSize /src/libiec61850/src/mms/iso_mms/server/mms_access_result.c 1 ['struct.sMmsValue *'] 2 0 181 18 19 5 2 50 41
MmsValue_newDefaultValue /src/libiec61850/src/mms/iso_mms/common/mms_value.c 1 ['struct.sMmsVariableSpecification *'] 5 0 329 37 9 21 3 88 38
MmsVariableSpecification_isValueOfType /src/libiec61850/src/mms/iso_mms/common/mms_type_spec.c 2 ['struct.sMmsVariableSpecification *', 'struct.sMmsValue *'] 1 0 289 50 19 3 1 45 38

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

Functions statically reachable by fuzzers
41.0%
94 / 229
Cyclomatic complexity statically reachable by fuzzers
45.0%
453 / 1002

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/libiec61850/src/mms/iso_mms/common/mms_type_spec.c [] []
/src/libiec61850/src/mms/iso_mms/common/mms_value.c ['fuzz_mms_decode'] ['fuzz_mms_decode']
/src/libiec61850/src/mms/iso_mms/server/mms_access_result.c ['fuzz_mms_decode'] ['fuzz_mms_decode']
/src/libiec61850/hal/memory/lib_memory.c ['fuzz_mms_decode'] ['fuzz_mms_decode']
/src/libiec61850/src/common/simple_allocator.c [] []
/src/libiec61850/src/common/linked_list.c [] []
/src/libiec61850/src/mms/asn1/asn1_ber_primitive_value.c ['fuzz_mms_decode'] ['fuzz_mms_decode']
/src/libiec61850/src/mms/asn1/ber_encoder.c [] []
/src/libiec61850/src/common/string_utilities.c ['fuzz_mms_decode'] ['fuzz_mms_decode']
/src/libiec61850/build/../fuzz/fuzz_mms_decode.c ['fuzz_mms_decode'] []
/src/libiec61850/src/mms/asn1/ber_decode.c ['fuzz_mms_decode'] ['fuzz_mms_decode']
/src/libiec61850/src/common/conversions.c [] []
/src/libiec61850/src/mms/asn1/ber_integer.c ['fuzz_mms_decode'] ['fuzz_mms_decode']

Directories in report

Directory
/src/libiec61850/src/common/
/src/libiec61850/build/../fuzz/
/src/libiec61850/src/mms/iso_mms/common/
/src/libiec61850/src/mms/asn1/
/src/libiec61850/src/mms/iso_mms/server/
/src/libiec61850/hal/memory/