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

Fuzzer details

Fuzzer: qrexec_remote_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 27 50.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 27 50.0%
All colors 54 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
4 131 7 :

['do_replace_chars', 'read_vchan_all', 'fuzz_libvchan_recv', 'fuzz_libvchan_data_ready', 'write_stdin', 'write_all', '__errno_location']

4 131 handle_remote_data call site: 00048 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/remote.c:123
0 0 None 24 39 flush_client_data call site: 00011 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/write-stdin.c:43
0 0 None 23 23 write_stdin call site: 00043 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/write-stdin.c:80
0 0 None 21 21 write_stdin call site: 00036 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/write-stdin.c:70
0 0 None 4 131 handle_remote_data call site: 00010 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/remote.c:57
0 0 None 4 131 handle_remote_data call site: 00032 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/remote.c:84
0 0 None 4 131 handle_remote_data call site: 00032 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/remote.c:91
0 0 None 4 131 handle_remote_data call site: 00046 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/remote.c:109
0 0 None 4 131 handle_remote_data call site: 00048 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/remote.c:117
0 0 None 4 4 write_stdin call site: 00042 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/write-stdin.c:76
0 0 None 2 15 write_all call site: 00050 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/ioall.c:62
0 0 None 0 6 fuzz_libvchan_read call site: 00028 /src/qubes-os/qubes-core-qrexec/fuzz/fuzz.c:62

Runtime coverage analysis

Covered functions
18
Functions that are reachable but not covered
12
Reachable functions
30
Percentage of reachable functions covered
60.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
qubes-core-qrexec/fuzz/qrexec_remote_fuzzer.c 2
qubes-core-qrexec/fuzz/fuzz.c 9
qubes-core-qrexec/fuzz/../libqrexec/buffer.c 8
qubes-core-qrexec/fuzz/../libqrexec/remote.c 1
qubes-core-qrexec/fuzz/../libqrexec/libqrexec-utils.h 1
qubes-core-qrexec/fuzz/../libqrexec/write-stdin.c 2
qubes-core-qrexec/fuzz/../libqrexec/txrx-vchan.c 1
qubes-core-qrexec/fuzz/../libqrexec/replace.c 1
qubes-core-qrexec/fuzz/../libqrexec/ioall.c 1

Fuzzer: input-proxy-receiver_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 38 35.5%
gold [1:9] 34 31.7%
yellow [10:29] 1 0.93%
greenyellow [30:49] 1 0.93%
lawngreen 50+ 33 30.8%
All colors 107 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
2 2 1 :

['perror']

2 2 validate_and_forward_event call site: 00086 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:321
0 0 None 2 2 receive_and_validate_caps call site: 00061 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:76
0 0 None 2 2 receive_and_validate_caps call site: 00065 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:96
0 0 None 2 2 receive_and_validate_caps call site: 00068 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:113
0 0 None 0 0 long_set_bit call site: 00012 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:52
0 0 None 0 0 receive_and_validate_caps call site: 00063 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:82
0 0 None 0 0 receive_and_validate_caps call site: 00080 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:153
0 0 None 0 0 input_proxy_receiver_main call site: 00011 /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c:581

Runtime coverage analysis

Covered functions
11
Functions that are reachable but not covered
12
Reachable functions
23
Percentage of reachable functions covered
47.83%
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
app-linux-input-proxy/fuzz/input-proxy-receiver_fuzzer.c 1
app-linux-input-proxy/fuzz/../src/common.c 2
app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c 9

Fuzzer: qubesrpc_parse_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 6 27.2%
gold [1:9] 0 0.0%
yellow [10:29] 3 13.6%
greenyellow [30:49] 3 13.6%
lawngreen 50+ 10 45.4%
All colors 22 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 22 28 parse_qubes_rpc_command call site: 00001 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c:312
0 0 None 18 24 parse_qubes_rpc_command call site: 00001 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c:320
0 0 None 18 24 parse_qubes_rpc_command call site: 00003 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c:327
0 0 None 10 16 parse_qubes_rpc_command call site: 00007 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c:362
0 0 None 4 10 parse_qubes_rpc_command call site: 00009 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c:381
0 0 None 0 6 parse_qubes_rpc_command call site: 00006 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c:355
0 0 None 0 0 parse_qubes_rpc_command call site: 00012 /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c:398

Runtime coverage analysis

Covered functions
3
Functions that are reachable but not covered
7
Reachable functions
10
Percentage of reachable functions covered
30.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
qubes-core-qrexec/fuzz/qubesrpc_parse_fuzzer.c 1
qubes-core-qrexec/fuzz/../libqrexec/exec.c 2

Fuzzer: db-daemon_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 115 92.7%
gold [1:9] 0 0.0%
yellow [10:29] 8 6.45%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 1 0.80%
All colors 124 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
25 25 3 :

['perror', 'libvchan_recv', 'verify_hdr']

504 508 handle_vchan_data call site: 00026 /src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-cmds.c:687
0 0 None 2 2 qubesdb_init call site: 00001 /src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-core.c:20
0 0 None 2 2 qubesdb_init call site: 00001 /src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-core.c:25
0 0 None 0 0 handle_vchan_data call site: 00035 /src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-cmds.c:710

Runtime coverage analysis

Covered functions
6
Functions that are reachable but not covered
42
Reachable functions
48
Percentage of reachable functions covered
12.5%
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
qubes-core-qubesdb/fuzz/db-daemon_fuzzer.c 6
qubes-core-qubesdb/fuzz/../daemon/db-core.c 6
qubes-core-qubesdb/fuzz/../daemon/db-cmds.c 14
qubes-core-qubesdb/fuzz/../daemon/buffer.c 4
qubes-core-qubesdb/fuzz/../daemon/buffer.h 1

Fuzzer: qrexec_daemon_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 120 70.1%
gold [1:9] 7 4.09%
yellow [10:29] 3 1.75%
greenyellow [30:49] 4 2.33%
lawngreen 50+ 37 21.6%
All colors 171 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 21 1 :

['send_service_refused']

0 21 handle_execute_service call site: 00039 /src/qubes-os/qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c:1043
0 4 1 :

['fuzz_exit']

0 4 send_service_refused call site: 00036 /src/qubes-os/qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c:712
0 0 None 2 276 handle_message_from_agent call site: 00038 /src/qubes-os/qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c:1313
0 0 None 0 6 fuzz_libvchan_read call site: 00009 /src/qubes-os/qubes-core-qrexec/fuzz/fuzz.c:62
0 0 None 0 4 send_service_refused call site: 00032 /src/qubes-os/qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c:707
0 0 None 0 0 fuzz_libvchan_read call site: 00010 /src/qubes-os/qubes-core-qrexec/fuzz/fuzz.c:65
0 0 None 0 0 fuzz_write call site: 00033 /src/qubes-os/qubes-core-qrexec/fuzz/fuzz.c:128
0 0 None 0 0 fuzz_write call site: 00034 /src/qubes-os/qubes-core-qrexec/fuzz/fuzz.c:131

Runtime coverage analysis

Covered functions
21
Functions that are reachable but not covered
36
Reachable functions
57
Percentage of reachable functions covered
36.84%
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
qubes-core-qrexec/fuzz/qrexec_daemon_fuzzer.c 2
qubes-core-qrexec/fuzz/fuzz.c 10
qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c 14
qubes-core-qrexec/fuzz/../libqrexec/ioall.c 3

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
fuzz_main /src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-daemon.c 2 ['int', 'char **'] 8 0 304 48 7 102 0 407 181
execute_qubes_rpc_command /src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c 7 ['char *', 'int *', 'int *', 'int *', 'int *', 'bool', 'struct.buffer *'] 5 0 89 9 4 46 0 174 67
init /src/qubes-os/qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c 1 ['int'] 5 0 363 69 9 48 0 126 58
handle_message_from_client /src/qubes-os/qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c 1 ['int'] 6 0 62 12 13 26 0 119 51
register_device /src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c 2 ['struct.options *', 'int'] 2 0 599 88 34 13 0 70 46

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

Functions statically reachable by fuzzers
81.0%
135 / 166
Cyclomatic complexity statically reachable by fuzzers
87.0%
862 / 991

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/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/unix-server.c [] []
/src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/buffer.c ['db-daemon_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/qrexec_daemon_fuzzer.c ['qrexec_daemon_fuzzer'] ['qrexec_daemon_fuzzer']
/src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-cmds.c ['db-daemon_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/replace.c ['qrexec_remote_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/qrexec_remote_fuzzer.c ['qrexec_remote_fuzzer'] ['qrexec_remote_fuzzer']
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/txrx-vchan.c ['qrexec_remote_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/log.c [] []
/src/qubes-os/qubes-core-qrexec/fuzz/../daemon/qrexec-daemon.c ['qrexec_daemon_fuzzer'] []
/src/qubes-os/app-linux-input-proxy/fuzz/input-proxy-receiver_fuzzer.c ['input-proxy-receiver_fuzzer'] ['input-proxy-receiver_fuzzer']
/src/qubes-os/app-linux-input-proxy/fuzz/../src/input-proxy-receiver.c ['input-proxy-receiver_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/qubesrpc_parse_fuzzer.c ['qubesrpc_parse_fuzzer'] ['qubesrpc_parse_fuzzer']
/src/qubes-os/qubes-core-qrexec/fuzz/fuzz.c ['qrexec_remote_fuzzer', 'qrexec_daemon_fuzzer'] ['qrexec_remote_fuzzer', 'qrexec_daemon_fuzzer']
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/remote.c ['qrexec_remote_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/exec.c ['qubesrpc_parse_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/ioall.c ['qrexec_remote_fuzzer', 'qrexec_daemon_fuzzer'] []
/src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-daemon.c [] []
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/write-stdin.c ['qrexec_remote_fuzzer'] []
/src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/db-core.c ['db-daemon_fuzzer'] []
/src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/buffer.h ['db-daemon_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/libqrexec-utils.h ['qrexec_remote_fuzzer'] []
/src/qubes-os/qubes-core-qubesdb/fuzz/db-daemon_fuzzer.c ['db-daemon_fuzzer'] ['db-daemon_fuzzer']
/src/qubes-os/app-linux-input-proxy/fuzz/../src/common.c ['input-proxy-receiver_fuzzer'] []
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/buffer.c ['qrexec_remote_fuzzer'] []

Directories in report

Directory
/src/qubes-os/qubes-core-qrexec/fuzz/../libqrexec/
/src/qubes-os/app-linux-input-proxy/fuzz/
/src/qubes-os/qubes-core-qubesdb/fuzz/
/src/qubes-os/qubes-core-qrexec/fuzz/
/src/qubes-os/qubes-core-qubesdb/fuzz/../daemon/
/src/qubes-os/app-linux-input-proxy/fuzz/../src/
/src/qubes-os/qubes-core-qrexec/fuzz/../daemon/