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: 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 2802 82.3%
gold [1:9] 84 2.46%
yellow [10:29] 5 0.14%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 513 15.0%
All colors 3404 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
5616 5616 1 :

['control_notify_window_layout_changed']

7579 19308 notify_callback call site: 00214 /src/tmux/notify.c:131
987 7020 10 :

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

987 7094 notify_insert_hook call site: 02490 /src/tmux/notify.c:89
590 764 6 :

['log_debug', 'args_value_as_string', 'xrecallocarray', 'fatalx', 'args_type_to_string', 'args_copy_value']

1105 1279 args_parse call site: 02844 /src/tmux/arguments.c:268
432 432 3 :

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

432 432 grid_view_scroll_region_up call site: 01270 /src/tmux/grid-view.c:109
393 474 5 :

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

393 474 format_cb_current_command call site: 00000 /src/tmux/format.c:873
323 323 1 :

['screen_reflow']

323 480 screen_resize_cursor call site: 00486 /src/tmux/screen.c:330
267 267 1 :

['screen_resize_y']

590 747 screen_resize_cursor call site: 00477 /src/tmux/screen.c:323
263 263 1 :

['grid_view_clear_history']

263 280 screen_write_clearscreen call site: 01170 /src/tmux/screen-write.c:1614
218 218 1 :

['layout_dump']

218 218 format_cb_window_layout call site: 00000 /src/tmux/format.c:820
189 189 1 :

['cmd_stringify_argv']

189 189 format_cb_start_command call site: 00000 /src/tmux/format.c:846
178 178 1 :

['options_array_free']

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

['cmd_find_log_state', 'cmd_find_best_winlink_with_window']

171 173 cmd_find_from_window call site: 00593 /src/tmux/cmd-find.c:775

Runtime coverage analysis

Covered functions
606
Functions that are reachable but not covered
638
Reachable functions
922
Percentage of reachable functions covered
30.8%
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 61
xmalloc.c 11
log.c 5
compat/vis.c 3
options.c 33
utf8.c 32
alerts.c 11
server-fn.c 4
notify.c 7
cmd-find.c 28
cmd-queue.c 32
format.c 69
cmd.c 23
session.c 12
control-notify.c 14
control.c 2
tmux.c 7
paste.c 3
server-client.c 8
file.c 16
proc.c 6
compat/imsg.c 10
compat/imsg-buffer.c 28
compat/freezero.c 1
layout.c 6
screen.c 18
screen-write.c 31
grid-view.c 10
grid.c 48
window-copy.c 9
tty.c 69
style.c 8
compat/strlcpy.c 1
compat/strtonum.c 1
colour.c 15
attributes.c 2
tty-term.c 9
compat/strlcat.c 1
tty-acs.c 5
hyperlinks.c 13
status.c 6
input.c 10
utf8-combined.c 4
format-draw.c 16
arguments.c 31
key-string.c 1
environ.c 17
regsub.c 3
job.c 7
compat/getprogname.c 1
compat/fdforkpty.c 1
compat/closefrom.c 2
cmd-parse.y 29
cmd-parse.c 2
compat/recallocarray.c 1
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 ['N/A', 'int', 'N/A', 'size_t', 'int'] 54 0 622 98 35 1451 0 11325 5059
cmd_new_session_exec /src/tmux/cmd-new-session.c 2 ['N/A', 'N/A'] 51 0 1201 203 73 1378 0 11179 1140
window_customize_init /src/tmux/window-customize.c 3 ['N/A', 'N/A', 'N/A'] 86 0 114 12 5 1057 0 7597 870
cmd_copy_mode_exec /src/tmux/cmd-copy-mode.c 2 ['N/A', 'N/A'] 35 0 227 35 14 889 0 6225 513
window_buffer_init /src/tmux/window-buffer.c 3 ['N/A', 'N/A', 'N/A'] 94 0 157 21 8 1133 0 8052 357
cmd_refresh_client_exec /src/tmux/cmd-refresh-client.c 2 ['N/A', 'N/A'] 78 0 532 83 32 959 0 7060 310
window_tree_init /src/tmux/window-tree.c 3 ['N/A', 'N/A', 'N/A'] 89 0 220 30 11 1064 0 7511 305

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

Functions statically reachable by fuzzers
68.0%
1699 / 2498
Cyclomatic complexity statically reachable by fuzzers
75.0%
14597 / 19461

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

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
args_parse 82 16 19.51% ['input-fuzzer']
args_print 45 15 33.33% ['input-fuzzer']
yyparse 760 167 21.97% ['input-fuzzer']
yylex 98 30 30.61% ['input-fuzzer']
yylex_token 104 37 35.57% ['input-fuzzer']
cmd_parse_expand_alias 44 13 29.54% ['input-fuzzer']
cmd_find 42 19 45.23% ['input-fuzzer']
colour_tostring 54 10 18.51% ['input-fuzzer']
colour_totheme 31 4 12.90% ['input-fuzzer']
colour_fromstring 65 20 30.76% ['input-fuzzer']
recallocarray 36 5 13.88% ['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% ['input-fuzzer']
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% ['input-fuzzer']
paste_time_tree_RB_REMOVE 65 26 40.0% ['input-fuzzer']
paste_time_tree_RB_REMOVE_COLOR 74 36 48.64% ['input-fuzzer']
paste_time_tree_RB_INSERT_COLOR 42 21 50.0% ['input-fuzzer']
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_mouse_status_range 36 5 13.88% ['input-fuzzer']
format_cb_session_group_attached_list 32 9 28.12% ['input-fuzzer']
layout_fix_panes 46 12 26.08% ['input-fuzzer']
notify_insert_hook 57 22 38.59% ['input-fuzzer']
options_array_set 66 18 27.27% ['input-fuzzer']
screen_write_combine 61 28 45.90% ['input-fuzzer']
screen_check_selection 72 5 6.944% ['input-fuzzer']
style_parse 182 61 33.51% ['input-fuzzer']
utf8_is_modifier 40 7 17.5% ['input-fuzzer']
window_pane_get_theme 33 14 42.42% ['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-kill-server.c [] []
/src/tmux/compat/getprogname.c ['input-fuzzer'] []
/src/tmux/cmd-move-window.c [] []
/src/tmux/cmd-wait-for.c [] []
/src/tmux/cmd-kill-pane.c [] []
/src/tmux/key-string.c ['input-fuzzer'] []
/src/tmux/resize.c [] []
/src/tmux/cmd-show-environment.c [] []
/src/tmux/cmd-list-sessions.c [] []
/src/tmux/cmd.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/getopt_long.c [] []
/src/tmux/cmd-rotate-window.c [] []
/src/tmux/arguments.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/attributes.c ['input-fuzzer'] []
/src/tmux/cmd-detach-client.c [] []
/src/tmux/hyperlinks.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-find.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/server-fn.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-queue.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-list-buffers.c [] []
/src/tmux/grid.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/server-client.c ['input-fuzzer'] []
/src/tmux/window-clock.c [] []
/src/tmux/utf8.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-bind-key.c [] []
/src/tmux/format-draw.c ['input-fuzzer'] []
/src/tmux/cmd-refresh-client.c [] []
/src/tmux/cmd-server-access.c [] []
/src/tmux/compat/recallocarray.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/colour.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/tty-term.c ['input-fuzzer'] []
/src/tmux/cmd-attach-session.c [] []
/src/tmux/environ.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-rename-window.c [] []
/src/tmux/cmd-switch-client.c [] []
/src/tmux/cmd-new-window.c [] []
/src/tmux/cmd-send-keys.c [] []
/src/tmux/tty-keys.c [] []
/src/tmux/compat/strlcpy.c ['input-fuzzer'] []
/src/tmux/window-copy.c ['input-fuzzer'] []
/src/tmux/cmd-unbind-key.c [] []
/src/tmux/log.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-split-window.c [] []
/src/tmux/compat/ntohll.c [] []
/src/tmux/cmd-display-menu.c [] []
/src/tmux/compat/htonll.c [] []
/src/tmux/names.c [] []
/src/tmux/compat/unvis.c [] []
/src/tmux/input.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-set-buffer.c [] []
/src/tmux/compat/imsg-buffer.c ['input-fuzzer'] []
/src/tmux/input-keys.c [] []
/src/tmux/tty-features.c [] []
/src/tmux/cmd-break-pane.c [] []
/src/tmux/cmd-new-session.c [] []
/src/tmux/cmd-run-shell.c [] []
/src/tmux/fuzz/input-fuzzer.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/freezero.c ['input-fuzzer'] []
/src/tmux/menu.c [] []
/src/tmux/popup.c [] []
/src/tmux/compat/getdtablecount.c [] []
/src/tmux/paste.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/format.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-load-buffer.c [] []
/src/tmux/screen-write.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/status.c ['input-fuzzer'] []
/src/tmux/mode-tree.c [] []
/src/tmux/regsub.c ['input-fuzzer'] []
/src/tmux/compat/setproctitle.c [] []
/src/tmux/cmd-show-messages.c [] []
/src/tmux/cmd-list-clients.c [] []
/src/tmux/notify.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/screen.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-join-pane.c [] []
/src/tmux/window-client.c [] []
/src/tmux/cmd-choose-tree.c [] []
/src/tmux/osdep-linux.c [] []
/src/tmux/cmd-resize-window.c [] []
/src/tmux/key-bindings.c [] []
/src/tmux/compat/strtonum.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-show-options.c [] []
/src/tmux/window-buffer.c [] []
/src/tmux/grid-view.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/layout.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/server-acl.c [] []
/src/tmux/server.c ['input-fuzzer'] []
/src/tmux/cmd-command-prompt.c [] []
/src/tmux/cmd-parse.y ['input-fuzzer'] ['input-fuzzer']
/src/tmux/grid-reader.c [] []
/src/tmux/layout-custom.c [] []
/src/tmux/cmd-list-keys.c [] []
/src/tmux/tty.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/vis.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-list-panes.c [] []
/src/tmux/window-customize.c [] []
/src/tmux/cmd-copy-mode.c [] []
/src/tmux/file.c ['input-fuzzer'] []
/src/tmux/cmd-select-pane.c [] []
/src/tmux/style.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/fgetln.c [] []
/src/tmux/tmux.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-resize-pane.c [] []
/src/tmux/cmd-list-windows.c [] []
/src/tmux/cmd-respawn-pane.c [] []
/src/tmux/compat/fdforkpty.c ['input-fuzzer'] []
/src/tmux/cmd-show-prompt-history.c [] []
/src/tmux/cmd-source-file.c [] []
/src/tmux/cmd-if-shell.c [] []
/src/tmux/cmd-kill-window.c [] []
/src/tmux/cmd-save-buffer.c [] []
/src/tmux/window.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/alerts.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-swap-window.c [] []
/src/tmux/layout-set.c [] []
/src/tmux/cmd-display-panes.c [] []
/src/tmux/cmd-rename-session.c [] []
/src/tmux/cmd-respawn-window.c [] []
/src/tmux/cmd-lock-server.c [] []
/src/tmux/compat/getpeereid.c [] []
/src/tmux/screen-redraw.c [] []
/src/tmux/cmd-paste-buffer.c [] []
/src/tmux/tty-acs.c ['input-fuzzer'] []
/src/tmux/proc.c ['input-fuzzer'] []
/src/tmux/cmd-parse.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/session.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/job.c ['input-fuzzer'] []
/src/tmux/xmalloc.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/compat/imsg.c ['input-fuzzer'] []
/src/tmux/cmd-display-message.c [] []
/src/tmux/options.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-set-option.c [] []
/src/tmux/cmd-swap-pane.c [] []
/src/tmux/control.c ['input-fuzzer'] []
/src/tmux/compat/closefrom.c ['input-fuzzer'] []
/src/tmux/utf8-combined.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/window-tree.c [] []
/src/tmux/cmd-set-environment.c [] []
/src/tmux/cmd-capture-pane.c [] []
/src/tmux/cmd-select-window.c [] []
/src/tmux/cfg.c ['input-fuzzer'] []
/src/tmux/spawn.c [] []
/src/tmux/cmd-kill-session.c [] []
/src/tmux/cmd-select-layout.c [] []
/src/tmux/cmd-find-window.c [] []
/src/tmux/control-notify.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-confirm-before.c [] []
/src/tmux/client.c [] []
/src/tmux/compat/strlcat.c ['input-fuzzer'] ['input-fuzzer']
/src/tmux/cmd-pipe-pane.c [] []

Directories in report

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