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

Fuzzer details

Fuzzer: input-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 1985 82.1%
gold [1:9] 13 0.53%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 417 17.2%
All colors 2415 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
5936 6342 10 :

['options_get_string', 'cmdq_free_state', 'cmdq_new_state', 'options_array_item_value', 'notify_insert_one_hook', 'options_array_next', 'free', 'cmdq_add_formats', 'cmd_parse_from_string', 'options_array_first']

5936 6416 notify_insert_hook call site: 01516 /src/tmux/notify.c:89
4990 4990 1 :

['control_notify_window_layout_changed']

6953 17426 notify_callback call site: 00186 /src/tmux/notify.c:131
430 430 3 :

['grid_scroll_history', 'grid_collect_history', 'grid_scroll_history_region']

430 430 grid_view_scroll_region_up call site: 00644 /src/tmux/grid-view.c:109
370 451 5 :

['parse_window_name', 'osdep_get_name', 'free', 'cmd_stringify_argv', 'xstrdup']

370 451 format_cb_current_command call site: 00000 /src/tmux/format.c:826
318 318 1 :

['screen_reflow']

318 475 screen_resize_cursor call site: 01990 /src/tmux/screen.c:297
266 266 1 :

['screen_resize_y']

584 741 screen_resize_cursor call site: 01989 /src/tmux/screen.c:294
262 262 1 :

['grid_view_clear_history']

262 279 screen_write_clearscreen call site: 00528 /src/tmux/screen-write.c:1488
259 259 1 :

['screen_write_combine']

259 10430 screen_write_cell call site: 00676 /src/tmux/screen-write.c:1858
218 218 1 :

['layout_dump']

218 218 format_cb_window_layout call site: 00000 /src/tmux/format.c:773
178 178 1 :

['options_array_free']

178 188 options_array_set call site: 00000 /src/tmux/options.c:436
171 171 2 :

['cmd_find_best_winlink_with_window', 'cmd_find_log_state']

171 173 cmd_find_from_window call site: 00375 /src/tmux/cmd-find.c:775
166 166 1 :

['cmd_stringify_argv']

166 166 format_cb_start_command call site: 00000 /src/tmux/format.c:799

Runtime coverage analysis

Covered functions
526
Functions that are reachable but not covered
631
Reachable functions
856
Percentage of reachable functions covered
26.29%
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
fuzz/input-fuzzer.c 1
window.c 50
xmalloc.c 11
log.c 5
compat/vis.c 3
options.c 30
utf8.c 26
alerts.c 11
server-fn.c 4
notify.c 6
cmd-find.c 28
cmd-queue.c 31
format.c 57
cmd.c 23
session.c 11
control-notify.c 14
control.c 2
tmux.c 4
paste.c 3
server-client.c 8
file.c 14
proc.c 6
compat/imsg.c 8
compat/imsg-buffer.c 10
compat/recallocarray.c 1
compat/freezero.c 1
compat/getdtablecount.c 1
window-copy.c 9
screen-write.c 32
screen.c 16
tty.c 11
style.c 5
colour.c 10
compat/strtonum.c 1
attributes.c 1
status.c 7
grid-view.c 10
grid.c 47
input.c 10
compat/strlcat.c 1
hyperlinks.c 11
arguments.c 29
key-string.c 1
environ.c 13
regsub.c 3
format-draw.c 4
job.c 5
compat/fdforkpty.c 1
compat/closefrom.c 2
compat/strlcpy.c 1
cmd-parse.y 29
cmd-parse.c 2
layout.c 1
tty-term.c 2
server.c 2
cfg.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
client_main /src/tmux/client.c 5 ['struct.event_base *', 'int ', 'char **', 'size_t ', 'int '] 28 0 630 98 35 1362 0 10357 4613
cmd_new_session_exec /src/tmux/cmd-new-session.c 2 ['struct.cmd *', 'struct.cmdq_item *'] 41 0 1203 203 73 1306 0 10429 1097
window_customize_init /src/tmux/window-customize.c 3 ['struct.window_mode_entry.10631 *', 'struct.cmd_find_state.11052 *', 'struct.args *'] 60 0 103 9 4 1003 0 7128 826
window_copy_cmd_copy_pipe_line_and_cancel /src/tmux/window-copy.c 1 ['struct.window_copy_cmd_state *'] 61 0 16 3 2 832 0 5862 485
window_buffer_init /src/tmux/window-buffer.c 3 ['struct.window_mode_entry.10631 *', 'struct.cmd_find_state.10632 *', 'struct.args *'] 60 0 160 21 8 1083 0 7663 368
cmd_refresh_client_exec /src/tmux/cmd-refresh-client.c 2 ['struct.cmd *', 'struct.cmdq_item *'] 35 0 519 80 31 899 0 6520 303
window_tree_init /src/tmux/window-tree.c 3 ['struct.window_mode_entry.10631 *', 'struct.cmd_find_state.11162 *', 'struct.args *'] 60 0 209 27 10 1012 0 7143 291

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

Functions statically reachable by fuzzers
69.0%
1599 / 2313
Cyclomatic complexity statically reachable by fuzzers
75.0%
13503 / 17953

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

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
colour_tostring 54 10 18.51% ['input-fuzzer']
format_entry_tree_RB_REMOVE 65 24 36.92% ['input-fuzzer']
format_entry_tree_RB_REMOVE_COLOR 74 8 10.81% ['input-fuzzer']
format_entry_tree_RB_INSERT_COLOR 42 17 40.47% ['input-fuzzer']
hyperlinks_by_inner_tree_RB_INSERT_COLOR 42 22 52.38% []
hyperlinks_by_inner_tree_RB_REMOVE 65 24 36.92% ['input-fuzzer']
hyperlinks_by_inner_tree_RB_REMOVE_COLOR 74 35 47.29% ['input-fuzzer']
options_tree_RB_REMOVE 65 18 27.69% ['input-fuzzer']
options_tree_RB_REMOVE_COLOR 74 8 10.81% ['input-fuzzer']
options_array_RB_INSERT_COLOR 42 22 52.38% []
paste_time_tree_RB_REMOVE 65 26 40.0% []
paste_time_tree_RB_REMOVE_COLOR 74 36 48.64% []
paste_time_tree_RB_INSERT_COLOR 42 21 50.0% []
windows_RB_INSERT_COLOR 42 7 16.66% ['input-fuzzer']
windows_RB_REMOVE_COLOR 74 8 10.81% ['input-fuzzer']
windows_RB_REMOVE 65 18 27.69% ['input-fuzzer']
window_pane_tree_RB_INSERT_COLOR 42 7 16.66% ['input-fuzzer']
window_pane_tree_RB_REMOVE_COLOR 74 8 10.81% ['input-fuzzer']
window_pane_tree_RB_REMOVE 65 18 27.69% ['input-fuzzer']
vis 81 24 29.62% ['input-fuzzer']
format_cb_session_group_attached_list 32 9 28.12% []
notify_insert_hook 57 22 38.59% ['input-fuzzer']
options_array_set 66 18 27.27% []
screen_write_overwrite 35 12 34.28% ['input-fuzzer']
screen_check_selection 72 5 6.944% ['input-fuzzer']
style_parse 127 27 21.25% ['input-fuzzer']

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/tmux/cmd-respawn-window.c [] []
/src/tmux/window-copy.c ['input-fuzzer'] []
/src/tmux/server-fn.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/attributes.c ['input-fuzzer'] []
/src/tmux/compat/getprogname.c [] []
/src/tmux/cmd-set-environment.c [] []
/src/tmux/compat/recallocarray.c ['input-fuzzer'] []
/src/tmux/osdep-linux.c [] []
/src/tmux/cmd-wait-for.c [] []
/src/tmux/cmd-break-pane.c [] []
/src/tmux/fuzz/input-fuzzer.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-rename-session.c [] []
/src/tmux/cmd-source-file.c [] []
/src/tmux/window-client.c [] []
/src/tmux/cmd-join-pane.c [] []
/src/tmux/popup.c [] []
/src/tmux/window-customize.c [] []
/src/tmux/cmd-attach-session.c [] []
/src/tmux/compat/closefrom.c ['input-fuzzer'] []
/src/tmux/cmd-display-menu.c [] []
/src/tmux/cmd-confirm-before.c [] []
/src/tmux/cmd-new-window.c [] []
/src/tmux/cmd-unbind-key.c [] []
/src/tmux/cmd-parse.y ['input-fuzzer'] []
/src/tmux/cmd-list-windows.c [] []
/src/tmux/screen.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-new-session.c [] []
/src/tmux/status.c ['input-fuzzer'] []
/src/tmux/cmd-rotate-window.c [] []
/src/tmux/arguments.c ['input-fuzzer'] []
/src/tmux/file.c ['input-fuzzer'] []
/src/tmux/mode-tree.c [] []
/src/tmux/input-keys.c [] []
/src/tmux/compat/getopt.c [] []
/src/tmux/cmd-parse.c ['input-fuzzer'] []
/src/tmux/grid-reader.c [] []
/src/tmux/server-client.c ['input-fuzzer'] []
/src/tmux/cmd-list-panes.c [] []
/src/tmux/layout-custom.c [] []
/src/tmux/utf8.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-copy-mode.c [] []
/src/tmux/cmd-queue.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/grid-view.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-select-window.c [] []
/src/tmux/resize.c [] []
/src/tmux/window.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-set-option.c [] []
/src/tmux/session.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/tmux.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-resize-window.c [] []
/src/tmux/grid.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/format-draw.c ['input-fuzzer'] []
/src/tmux/style.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-kill-pane.c [] []
/src/tmux/hyperlinks.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/vis.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/strtonum.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-pipe-pane.c [] []
/src/tmux/format.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/window-clock.c [] []
/src/tmux/alerts.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cfg.c ['input-fuzzer'] []
/src/tmux/options.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-kill-server.c [] []
/src/tmux/cmd-respawn-pane.c [] []
/src/tmux/cmd-switch-client.c [] []
/src/tmux/tty-term.c ['input-fuzzer'] []
/src/tmux/control.c ['input-fuzzer'] []
/src/tmux/cmd-move-window.c [] []
/src/tmux/cmd-detach-client.c [] []
/src/tmux/input.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/unvis.c [] []
/src/tmux/compat/imsg-buffer.c ['input-fuzzer'] []
/src/tmux/cmd-show-options.c [] []
/src/tmux/screen-write.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/log.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-kill-window.c [] []
/src/tmux/cmd-swap-window.c [] []
/src/tmux/cmd-list-clients.c [] []
/src/tmux/cmd-show-messages.c [] []
/src/tmux/cmd-choose-tree.c [] []
/src/tmux/tty-features.c [] []
/src/tmux/compat/strlcat.c ['input-fuzzer'] []
/src/tmux/environ.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/notify.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-display-panes.c [] []
/src/tmux/paste.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-select-layout.c [] []
/src/tmux/cmd-rename-window.c [] []
/src/tmux/compat/fdforkpty.c ['input-fuzzer'] []
/src/tmux/cmd-run-shell.c [] []
/src/tmux/cmd-load-buffer.c [] []
/src/tmux/job.c ['input-fuzzer'] []
/src/tmux/key-bindings.c [] []
/src/tmux/cmd-list-buffers.c [] []
/src/tmux/cmd-list-keys.c [] []
/src/tmux/spawn.c [] []
/src/tmux/cmd-set-buffer.c [] []
/src/tmux/tty-acs.c [] []
/src/tmux/cmd.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/key-string.c ['input-fuzzer'] []
/src/tmux/layout.c ['input-fuzzer'] []
/src/tmux/server.c ['input-fuzzer'] []
/src/tmux/cmd-refresh-client.c [] []
/src/tmux/colour.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/fgetln.c [] []
/src/tmux/names.c [] []
/src/tmux/compat/strlcpy.c ['input-fuzzer'] []
/src/tmux/cmd-command-prompt.c [] []
/src/tmux/tty.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/layout-set.c [] []
/src/tmux/compat/getdtablecount.c ['input-fuzzer'] []
/src/tmux/cmd-list-sessions.c [] []
/src/tmux/cmd-show-prompt-history.c [] []
/src/tmux/window-tree.c [] []
/src/tmux/cmd-save-buffer.c [] []
/src/tmux/server-acl.c [] []
/src/tmux/xmalloc.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-lock-server.c [] []
/src/tmux/cmd-display-message.c [] []
/src/tmux/client.c [] []
/src/tmux/cmd-kill-session.c [] []
/src/tmux/cmd-show-environment.c [] []
/src/tmux/cmd-select-pane.c [] []
/src/tmux/cmd-swap-pane.c [] []
/src/tmux/compat/getpeereid.c [] []
/src/tmux/cmd-send-keys.c [] []
/src/tmux/compat/freezero.c ['input-fuzzer'] []
/src/tmux/cmd-split-window.c [] []
/src/tmux/tty-keys.c [] []
/src/tmux/cmd-capture-pane.c [] []
/src/tmux/compat/imsg.c ['input-fuzzer'] []
/src/tmux/cmd-find.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/menu.c [] []
/src/tmux/regsub.c ['input-fuzzer'] []
/src/tmux/cmd-resize-pane.c [] []
/src/tmux/control-notify.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-find-window.c [] []
/src/tmux/proc.c ['input-fuzzer'] []
/src/tmux/cmd-server-access.c [] []
/src/tmux/screen-redraw.c [] []
/src/tmux/window-buffer.c [] []
/src/tmux/compat/setproctitle.c [] []
/src/tmux/cmd-if-shell.c [] []
/src/tmux/cmd-bind-key.c [] []
/src/tmux/cmd-paste-buffer.c [] []

Directories in report

Directory
/src/tmux/fuzz/
/src/tmux/
/src/tmux/compat/