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

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined 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

Fuzzer details

Fuzzer: fuzz_htp_c

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 102 24.6%
gold [1:9] 1 0.24%
yellow [10:29] 3 0.72%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 308 74.3%
All colors 414 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
177 177 4 :

['htp_parse_authorization_basic', 'htp_parse_authorization_bearer', 'bstr_begins_with_c_nocase', 'htp_parse_authorization_digest']

177 177 htp_parse_authorization call site: 00000 /src/libhtp/htp/htp_parsers.c:189
167 631 14 :

['bstr_index_of_c_nocasenorzero', 'bstr_free', 'htp_is_space', 'bstr_cmp_c_nocase', 'htp_table_size', 'free', 'htp_table_clear', 'bstr_index_of_c_nocase', 'htp_log', 'htp_table_get_index', 'bstr_adjust_len', 'htp_parse_content_length', 'bstr_dup_lower', 'htp_table_get_c']

167 801 htp_connp_RES_BODY_DETERMINE call site: 00000 /src/libhtp/htp/htp_response.c:607
150 189 2 :

['htp_log', 'htp_parse_content_length']

150 195 htp_process_request_header_generic call site: 00000 /src/libhtp/htp/htp_request_generic.c:92
150 189 2 :

['htp_log', 'htp_parse_content_length']

150 195 htp_process_response_header_generic call site: 00000 /src/libhtp/htp/htp_response_generic.c:289
100 110 3 :

['htp_parse_single_cookie_v0', 'htp_table_create', '__ctype_b_loc']

100 110 htp_parse_cookies_v0 call site: 00000 /src/libhtp/htp/htp_cookies.c:90
95 107 7 :

['bstr_builder_destroy', 'htp_list_array_size', 'bstr_free', 'free', 'htp_list_array_get', 'htp_list_array_destroy', 'htp_mpart_part_destroy']

95 107 htp_mpartp_destroy call site: 00305 /src/libhtp/htp/htp_multipart.c:945
17 63 6 :

['bstr_builder_destroy', 'bstr_free', 'htp_table_size', 'htp_table_destroy', 'free', 'htp_table_get_index']

17 63 htp_urlenp_destroy call site: 00293 /src/libhtp/htp/htp_urlencoded.c:208
2 2 1 :

['calloc']

12 120 htp_parse_uri call site: 00000 /src/libhtp/htp/htp_util.c:722
2 2 1 :

['__snprintf_chk']

6 28 htp_log call site: 00167 /src/libhtp/htp/htp_util.c:428
0 107 1 :

['htp_tx_destroy_incomplete']

0 107 htp_tx_create call site: 00000 /src/libhtp/htp/htp_transaction.c:101
0 39 1 :

['htp_log']

0 45 htp_process_request_header_generic call site: 00000 /src/libhtp/htp/htp_request_generic.c:123
0 39 1 :

['htp_log']

0 45 htp_process_response_header_generic call site: 00000 /src/libhtp/htp/htp_response_generic.c:324

Runtime coverage analysis

Covered functions
247
Functions that are reachable but not covered
20
Reachable functions
153
Percentage of reachable functions covered
86.93%
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
test/fuzz/fuzz_htp.c 13
htp/htp_config.c 35
htp/htp_hooks.c 4
htp/htp_list.c 9
htp/bstr.c 3
htp/htp_connection_parser.c 7
htp/htp_connection.c 7
htp/htp_util.c 4
test/test.c 2
htp/htp_request.c 7
htp/htp_transaction.c 14
htp/htp_decompressors.c 5
htp/lzma/LzmaDec.c 14
htp/htp_table.c 4
htp/htp_urlencoded.c 1
htp/bstr_builder.c 1
htp/htp_multipart.c 2
htp/htp_response.c 7

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
htp_connp_REQ_HEADERS /src/libhtp/htp/htp_request.c 1 ['N/A'] 8 0 407 75 30 89 0 599 513
htp_connp_REQ_LINE /src/libhtp/htp/htp_request.c 1 ['N/A'] 7 0 65 12 5 58 0 510 287
htp_config_register_multipart_parser /src/libhtp/htp/htp_config.c 1 ['N/A'] 8 0 23 6 3 67 0 408 253
htp_mpartp_handle_data /src/libhtp/htp/htp_multipart.c 4 ['N/A', 'N/A', 'size_t', 'int'] 7 0 69 14 6 63 0 379 190
htp_connp_RES_BODY_DETERMINE /src/libhtp/htp/htp_response.c 1 ['N/A'] 6 0 642 130 52 53 0 340 122
htp_parse_request_line_apache_2_2 /src/libhtp/htp/htp_request_apache_2_2.c 1 ['N/A'] 4 0 13 3 2 21 0 179 110
htp_config_register_urlencoded_parser /src/libhtp/htp/htp_config.c 1 ['N/A'] 8 0 24 6 3 56 0 289 76
htp_connp_RES_HEADERS /src/libhtp/htp/htp_response.c 1 ['N/A'] 5 0 736 134 56 31 0 186 68
htp_connp_RES_BODY_CHUNKED_LENGTH /src/libhtp/htp/htp_response.c 1 ['N/A'] 6 0 224 38 16 48 0 549 57
test_run /src/libhtp/test/test.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 10 0 28 3 2 114 0 849 55

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

Functions statically reachable by fuzzers
68.0%
302 / 443
Cyclomatic complexity statically reachable by fuzzers
77.0%
2646 / 3443

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 Runtime reached by Fuzzers Combined 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/libhtp/htp/htp_request_generic.c [] []
/src/libhtp/htp/htp_hooks.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_base64.c [] []
/src/libhtp/htp/htp_response.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_multipart.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_table.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_util.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/bstr_builder.c ['fuzz_htp_c'] []
/src/libhtp/test/test.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_request.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/strlcat.c [] []
/usr/include/ctype.h [] []
/src/libhtp/htp/htp_config.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_urlencoded.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_content_handlers.c [] []
/src/libhtp/htp/htp_request_apache_2_2.c [] []
/src/libhtp/htp/htp_decompressors.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_utf8_decoder.c [] []
/src/libhtp/htp/htp_parsers.c [] []
/src/libhtp/htp/lzma/LzmaDec.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_connection_parser.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_transaction.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_connection.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_response_generic.c [] []
/src/libhtp/htp/htp_list.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/test/fuzz/fuzz_htp.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/bstr.c ['fuzz_htp_c'] ['fuzz_htp_c']
/src/libhtp/htp/htp_cookies.c [] []

Directories in report

Directory
/src/libhtp/htp/lzma/
/src/libhtp/test/
/src/libhtp/htp/
/src/libhtp/test/fuzz/
/usr/include/