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

Fuzzer details

Fuzzer: gtp_message_fuzz

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 30 10.9%
gold [1:9] 91 33.0%
yellow [10:29] 12 4.36%
greenyellow [30:49] 3 1.09%
lawngreen 50+ 139 50.5%
All colors 275 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 0 None 85 782 ogs_log_vprintf call site: 00011 /src/open5gs/builddir/../lib/core/ogs-log.c:393
0 0 None 85 782 ogs_log_vprintf call site: 00039 /src/open5gs/builddir/../lib/core/ogs-log.c:414
0 0 None 85 782 ogs_log_vprintf call site: 00044 /src/open5gs/builddir/../lib/core/ogs-log.c:423
0 0 None 0 313 ogs_tlv_parse_msg call site: 00146 /src/open5gs/builddir/../lib/core/ogs-tlv-msg.c:752
0 0 None 0 0 ogs_pkbuf_alloc_debug call site: 00000 /src/open5gs/builddir/../lib/core/ogs-pkbuf.c:227
0 0 None 0 0 ogs_vslprintf call site: 00032 /src/open5gs/builddir/../lib/core/ogs-strings.c:102

Runtime coverage analysis

Covered functions
63
Functions that are reachable but not covered
22
Reachable functions
85
Percentage of reachable functions covered
74.12%
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
tests/fuzzing/gtp-message-fuzz.c 1
tests/fuzzing/fuzzing.h 1
lib/core/ogs-core.c 2
lib/core/ogs-memory.c 2
lib/core/ogs-log.c 16
lib/core/ogs-list.h 2
lib/core/ogs-abort.c 1
lib/core/ogs-time.c 2
lib/core/ogs-strings.c 3
lib/core/ogs-errno.c 1
lib/core/ogs-pkbuf.c 5
lib/core/ogs-socket.c 1
lib/core/ogs-tlv.c 7
lib/core/ogs-pkbuf.h 6
lib/gtp/v2/message.c 1
/usr/include/x86_64-linux-gnu/bits/byteswap.h 1
lib/core/ogs-tlv-msg.c 5
lib/core/ogs-rbtree.h 1
lib/core/ogs-rbtree.c 5

Fuzzer: nas_message_fuzz

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 142 12.5%
gold [1:9] 201 17.7%
yellow [10:29] 127 11.2%
greenyellow [30:49] 23 2.03%
lawngreen 50+ 639 56.4%
All colors 1132 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
782 782 9 :

['log_content', 'log_linefeed', 'ogs_strerror', 'log_level', 'fflush', 'log_domain', 'log_timestamp', 'ogs_list_next.946', 'ogs_abort']

782 782 ogs_log_vprintf call site: 00014 /src/open5gs/builddir/../lib/core/ogs-log.c:397
82 82 1 :

['ogs_log_set_domain_level']

82 82 ogs_log_install_domain call site: 00089 /src/open5gs/builddir/../lib/core/ogs-log.c:299
0 0 None 782 782 ogs_log_vprintf call site: 00011 /src/open5gs/builddir/../lib/core/ogs-log.c:393
0 0 None 0 0 ogs_pkbuf_alloc_debug call site: 00115 /src/open5gs/builddir/../lib/core/ogs-pkbuf.c:227
0 0 None 0 0 ogs_vslprintf call site: 00032 /src/open5gs/builddir/../lib/core/ogs-strings.c:102
0 0 None 0 0 ogs_nas_eps_decode_attach_request call site: 00169 /src/open5gs/builddir/../lib/nas/eps/decoder.c:95
0 0 None 0 0 ogs_nas_eps_decode_attach_request call site: 00195 /src/open5gs/builddir/../lib/nas/eps/decoder.c:131
0 0 None 0 0 ogs_nas_eps_decode_attach_request call site: 00234 /src/open5gs/builddir/../lib/nas/eps/decoder.c:202
0 0 None 0 0 ogs_nas_eps_decode_attach_request call site: 00260 /src/open5gs/builddir/../lib/nas/eps/decoder.c:244
0 0 None 0 0 ogs_nas_eps_decode_attach_request call site: 00275 /src/open5gs/builddir/../lib/nas/eps/decoder.c:266
0 0 None 0 0 ogs_nas_eps_decode_attach_request call site: 00283 /src/open5gs/builddir/../lib/nas/eps/decoder.c:278
0 0 None 0 0 ogs_nas_eps_decode_attach_request call site: 00292 /src/open5gs/builddir/../lib/nas/eps/decoder.c:290

Runtime coverage analysis

Covered functions
152
Functions that are reachable but not covered
32
Reachable functions
184
Percentage of reachable functions covered
82.61%
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
tests/fuzzing/nas-message-fuzz.c 1
tests/fuzzing/fuzzing.h 1
lib/core/ogs-core.c 2
lib/core/ogs-memory.c 3
lib/core/ogs-log.c 16
lib/core/ogs-list.h 2
lib/core/ogs-abort.c 1
lib/core/ogs-time.c 2
lib/core/ogs-strings.c 3
lib/core/ogs-errno.c 1
lib/core/ogs-pkbuf.c 6
lib/core/ogs-socket.c 1
lib/core/ogs-tlv.c 1
lib/core/ogs-pkbuf.h 6
lib/nas/eps/decoder.c 28
lib/nas/eps/ies.c 88
/usr/include/x86_64-linux-gnu/bits/byteswap.h 2

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
ogs_gtp_send_error_message /src/open5gs/builddir/../lib/gtp/path.c 4 ['struct.ogs_gtp_xact_s *', 'int', 'char', 'char'] 12 0 52 7 8 92 0 587 448
ogs_nas_esm_decode /src/open5gs/builddir/../lib/nas/eps/decoder.c 2 ['struct.ogs_nas_eps_message_s *', 'struct.ogs_pkbuf_s *'] 7 0 680 92 23 84 0 444 339
ogs_gtp_context_parse_config /src/open5gs/builddir/../lib/gtp/context.c 2 ['char *', 'char *'] 7 0 2046 442 106 81 0 452 311
ogs_app_initialize /src/open5gs/builddir/../lib/app/ogs-init.c 3 ['char *', 'char *', 'char **'] 17 0 448 70 15 101 0 434 243
eps_qos_build /src/open5gs/builddir/../lib/nas/common/types.c 6 ['struct.ogs_nas_eps_quality_of_service_s *', 'char', 'size_t', 'size_t', 'size_t', 'size_t'] 1 0 239 27 10 1 0 63 63
ogs_getopt_long /src/open5gs/builddir/../lib/core/ogs-getopt.c 3 ['struct.ogs_getopt_s *', 'struct.ogs_cluster_s *', 'int *'] 3 0 300 40 15 13 1 89 59
epoll_cleanup /src/open5gs/builddir/../lib/core/ogs-epoll.c 1 ['struct.ogs_pollset_s *'] 19 0 79 13 2 49 0 146 54
ogs_pcc_rule_update_qos_from_media /src/open5gs/builddir/../lib/proto/types.c 2 ['struct.ogs_pcc_rule_s *', 'struct.ogs_media_component_s *'] 6 0 830 126 37 42 0 148 53
ogs_gtp_xact_receive /src/open5gs/builddir/../lib/gtp/xact.c 3 ['struct.ogs_gtp_node_s *', 'struct.ogs_gtp2_header_s *', 'struct.ogs_gtp_xact_s **'] 10 0 425 61 12 68 0 329 52
ogs_ipsubnet /src/open5gs/builddir/../lib/core/ogs-sockaddr.c 3 ['struct.ogs_ipsubnet_s *', 'char *', 'char *'] 14 0 270 44 13 39 0 134 45

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

Functions statically reachable by fuzzers
50.0%
360 / 727
Cyclomatic complexity statically reachable by fuzzers
65.0%
2453 / 3760

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/open5gs/builddir/../lib/proto/types.c [] []
/src/open5gs/builddir/../lib/core/ogs-pkbuf.h ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-conv.h [] []
/src/open5gs/builddir/../lib/core/ogs-udp.c [] []
/src/open5gs/builddir/../tests/fuzzing/gtp-message-fuzz.c ['gtp_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-tlv-msg.c ['gtp_message_fuzz'] []
/src/open5gs/builddir/../lib/nas/eps/decoder.c ['nas_message_fuzz'] []
/src/open5gs/builddir/../lib/gtp/xact.c [] []
/src/open5gs/builddir/../lib/core/ogs-log.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../tests/fuzzing/nas-message-fuzz.c ['nas_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-thread.h [] []
/src/open5gs/builddir/../lib/app/ogs-yaml.c [] []
/src/open5gs/builddir/../lib/core/ogs-env.c [] []
/src/open5gs/builddir/../lib/gtp/v1/path.c [] []
/src/open5gs/builddir/../lib/core/ogs-core.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-list.h ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/gtp/v2/conv.c [] []
/src/open5gs/builddir/../lib/gtp/v1/message.c [] []
/src/open5gs/builddir/../lib/core/ogs-rbtree.c ['gtp_message_fuzz'] []
/src/open5gs/builddir/../lib/gtp/v2/message.c ['gtp_message_fuzz'] []
/src/open5gs/builddir/../lib/app/ogs-init.c [] []
/src/open5gs/builddir/../lib/nas/eps/ies.c ['nas_message_fuzz'] []
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../tests/fuzzing/fuzzing.h ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-tlv.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/nas/common/types.c [] []
/src/open5gs/builddir/../lib/core/ogs-strings.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-notify.c [] []
/src/open5gs/builddir/../lib/gtp/path.c [] []
/src/open5gs/builddir/../lib/core/ogs-conv.c [] []
/src/open5gs/builddir/../lib/core/ogs-time.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/gtp/v1/build.c [] []
/src/open5gs/builddir/../lib/core/ogs-socknode.c [] []
/src/open5gs/builddir/../lib/core/ogs-epoll.c [] []
/src/open5gs/builddir/../lib/core/ogs-getopt.c [] []
/src/open5gs/builddir/../lib/core/ogs-abort.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-timer.c [] []
/src/open5gs/builddir/../lib/core/ogs-pkbuf.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/app/ogs-config.c [] []
/src/open5gs/builddir/../lib/gtp/context.c [] []
/src/open5gs/builddir/../lib/core/ogs-socket.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-hash.c [] []
/src/open5gs/builddir/../lib/core/ogs-sockopt.c [] []
/src/open5gs/builddir/../lib/core/ogs-rbtree.h ['gtp_message_fuzz'] []
/src/open5gs/builddir/../lib/core/ogs-memory.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/gtp/v2/build.c [] []
/src/open5gs/builddir/../lib/core/ogs-poll.c [] []
/src/open5gs/builddir/../lib/core/ogs-errno.c ['gtp_message_fuzz', 'nas_message_fuzz'] []
/src/open5gs/builddir/../lib/app/ogs-context.c [] []
/src/open5gs/builddir/../lib/gtp/v2/path.c [] []
/src/open5gs/builddir/../lib/core/ogs-queue.c [] []
/src/open5gs/builddir/../lib/core/ogs-sockaddr.c [] []

Directories in report

Directory
/src/open5gs/builddir/../lib/nas/eps/
/src/open5gs/builddir/../tests/fuzzing/
/src/open5gs/builddir/../lib/gtp/v2/
/src/open5gs/builddir/../lib/nas/common/
/src/open5gs/builddir/../lib/core/
/src/open5gs/builddir/../lib/proto/
/src/open5gs/builddir/../lib/gtp/
/usr/include/x86_64-linux-gnu/bits/
/src/open5gs/builddir/../lib/gtp/v1/
/src/open5gs/builddir/../lib/app/