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

Fuzzer details

Fuzzer: ares_create_query_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 1 9.09%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 10 90.9%
All colors 11 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
1 5 ares_striendstr call site: 00005 __ctype_tolower_loc

Runtime coverage analysis

Covered functions
5
Functions that are reachable but not covered
4
Reachable functions
8
Percentage of reachable functions covered
50.0%
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/c-ares/test/ares-test-fuzz-name.c 1
ares_create_query.c 1
ares_getnameinfo.c 2
/usr/include/ctype.h 1

Fuzzer: ares_parse_reply_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 1 0.92%
gold [1:9] 0 0.0%
yellow [10:29] 7 6.48%
greenyellow [30:49] 3 2.77%
lawngreen 50+ 97 89.8%
All colors 108 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 0 96 ares__parse_txt_reply call site: 00079 /src/c-ares/src/lib/ares_parse_txt_reply.c:150
0 0 None 0 30 ares__addrinfo2hostent call site: 00036 /src/c-ares/src/lib/ares__addrinfo2hostent.c:70
0 0 None 0 24 ares_parse_soa_reply call site: 00085 /src/c-ares/src/lib/ares_parse_soa_reply.c:116
0 0 None 0 10 ares_parse_ptr_reply call site: 00051 /src/c-ares/src/lib/ares_parse_ptr_reply.c:126
0 0 None 0 10 ares_parse_ptr_reply call site: 00053 /src/c-ares/src/lib/ares_parse_ptr_reply.c:190
0 0 None 0 6 ares__addrinfo2hostent call site: 00036 /src/c-ares/src/lib/ares__addrinfo2hostent.c:177
0 0 None 0 0 ares_free_data call site: 00070 /src/c-ares/src/lib/ares_data.c:64
0 0 None 0 0 ares_free_data call site: 00070 /src/c-ares/src/lib/ares_data.c:64
0 0 None 0 0 ares__expand_name_validated call site: 00012 /src/c-ares/src/lib/ares_expand_name.c:207
0 0 None 0 0 ares__addrinfo_cat_cnames call site: 00029 /src/c-ares/src/lib/ares_getaddrinfo.c:151
0 0 None 0 0 ares__addrinfo_cat_nodes call site: 00028 /src/c-ares/src/lib/ares_getaddrinfo.c:210
0 0 None 0 0 ares_parse_ns_reply call site: 00059 /src/c-ares/src/lib/ares_parse_ns_reply.c:79

Runtime coverage analysis

Covered functions
40
Functions that are reachable but not covered
5
Reachable functions
44
Percentage of reachable functions covered
88.64%
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/c-ares/test/ares-test-fuzz.c 1
ares_parse_a_reply.c 1
ares__parse_into_addrinfo.c 1
ares_expand_name.c 7
ares_nowarn.c 2
ares__addrinfo_localhost.c 1
ares_getaddrinfo.c 6
/usr/include/x86_64-linux-gnu/bits/byteswap.h 1
ares_strdup.c 1
ares_freeaddrinfo.c 2
ares__addrinfo2hostent.c 2
ares_free_hostent.c 1
ares_parse_aaaa_reply.c 1
ares_parse_ptr_reply.c 1
ares_parse_ns_reply.c 1
ares_parse_srv_reply.c 1
ares_data.c 2
ares_parse_mx_reply.c 1
ares_parse_txt_reply.c 2
ares_parse_soa_reply.c 1
ares_parse_naptr_reply.c 1
ares_expand_string.c 1
ares_parse_caa_reply.c 1
ares_parse_uri_reply.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
next_dns_lookup /src/c-ares/src/lib/ares_getaddrinfo.c 1 ['struct.host_query *'] 11 0 226 38 12 143 0 980 733
ares_process_fd /src/c-ares/src/lib/ares_process.c 3 ['struct.ares_channeldata *', 'int', 'int'] 15 0 15 3 2 95 0 540 180
ares_getaddrinfo /src/c-ares/src/lib/ares_getaddrinfo.c 6 ['struct.ares_channeldata *', 'char *', 'char *', 'struct.ares_addrinfo_hints *', 'func_type *', 'char *'] 10 0 366 58 24 134 0 879 92
ares_getnameinfo /src/c-ares/src/lib/ares_getnameinfo.c 6 ['struct.ares_channeldata *', 'struct.sockaddr *', 'int', 'int', 'func_type *', 'char *'] 11 0 256 42 17 128 0 822 54
ares__readaddrinfo /src/c-ares/src/lib/ares__readaddrinfo.c 5 ['struct._IO_FILE *', 'char *', 'short', 'struct.ares_addrinfo_hints *', 'struct.ares_addrinfo *'] 7 0 776 151 48 31 0 234 48

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

Functions statically reachable by fuzzers
78.0%
165 / 212
Cyclomatic complexity statically reachable by fuzzers
90.0%
1567 / 1738

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/c-ares/src/lib/inet_ntop.c [] []
/src/c-ares/src/lib/ares_expand_string.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/usr/include/ctype.h ['ares_create_query_fuzzer'] []
/src/c-ares/src/lib/ares_search.c [] []
/src/c-ares/src/lib/ares__htable.c [] []
/src/c-ares/src/lib/ares_parse_ptr_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_rand.c [] []
/src/c-ares/src/lib/ares_gethostbyaddr.c [] []
/src/c-ares/src/lib/ares__read_line.c [] []
/src/c-ares/src/lib/ares_parse_ns_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/inet_net_pton.c [] []
/src/c-ares/src/lib/ares_process.c [] []
/src/c-ares/src/lib/ares_freeaddrinfo.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_expand_name.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_nowarn.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares__get_hostent.c [] []
/src/c-ares/test/ares-test-fuzz.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_data.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/test/ares-test-fuzz-name.c ['ares_create_query_fuzzer'] ['ares_create_query_fuzzer']
/src/c-ares/src/lib/ares__parse_into_addrinfo.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares__addrinfo2hostent.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_send.c [] []
/src/c-ares/src/lib/ares_parse_uri_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares__addrinfo_localhost.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_parse_aaaa_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares__llist.c [] []
/src/c-ares/src/lib/ares_parse_soa_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_parse_a_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_query.c [] []
/src/c-ares/src/lib/ares_free_string.c [] []
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['ares_parse_reply_fuzzer'] []
/src/c-ares/src/lib/ares_parse_srv_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_create_query.c ['ares_create_query_fuzzer'] ['ares_create_query_fuzzer']
/src/c-ares/src/lib/ares__timeval.c [] []
/src/c-ares/src/lib/ares__close_sockets.c [] []
/src/c-ares/src/lib/ares_parse_mx_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_parse_txt_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_parse_caa_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_getnameinfo.c ['ares_create_query_fuzzer'] ['ares_create_query_fuzzer']
/src/c-ares/src/lib/ares_strdup.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares__readaddrinfo.c [] []
/src/c-ares/src/lib/ares__sortaddrinfo.c [] []
/src/c-ares/src/lib/ares_free_hostent.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares__htable_stvp.c [] []
/src/c-ares/src/lib/ares_parse_naptr_reply.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares_getaddrinfo.c ['ares_parse_reply_fuzzer'] ['ares_parse_reply_fuzzer']
/src/c-ares/src/lib/ares__slist.c [] []
/src/c-ares/src/lib/ares_library_init.c [] []

Directories in report

Directory
/usr/include/
/src/c-ares/test/
/usr/include/x86_64-linux-gnu/bits/
/src/c-ares/src/lib/