aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2022-07-18 21:24:06 +0000
committerAllan Jude <allanjude@FreeBSD.org>2022-07-18 22:06:15 +0000
commit287d467c5db5a46f13566a2f9dae80a695335c73 (patch)
tree3a3edf1b3d3072a781ddef068fa817956abc1108 /sys/ddb
parent2449b9e5fe565be757a4b29093fd1c9c6ffcf3c9 (diff)
downloadsrc-287d467c5db5a46f13566a2f9dae80a695335c73.tar.gz
src-287d467c5db5a46f13566a2f9dae80a695335c73.zip
mac: add new mac_ddb(4) policy
Generally, access to the kernel debugger is considered to be unsafe from a security perspective since it presents an unrestricted interface to inspect or modify the system state, including sensitive data such as signing keys. However, having some access to debugger functionality on production systems may be useful in determining the cause of a panic or hang. Therefore, it is desirable to have an optional policy which allows limited use of ddb(4) while disabling the functionality which could reveal system secrets. This loadable MAC module allows for the use of some ddb(4) commands while preventing the execution of others. The commands have been broadly grouped into three categories: - Those which are 'safe' and will not emit sensitive data (e.g. trace). Generally, these commands are deterministic and don't accept arguments. - Those which are definitively unsafe (e.g. examine <addr>, search <addr> <value>) - Commands which may be safe to execute depending on the arguments provided (e.g. show thread <addr>). Safe commands have been flagged as such with the DB_CMD_MEMSAFE flag. Commands requiring extra validation can provide a function to do so. For example, 'show thread <addr>' can be used as long as addr can be checked against the system's list of process structures. The policy also prevents debugger backends other than ddb(4) from executing, for example gdb(4). Reviewed by: markj, pauamma_gundo.com (manpages) Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35371
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/ddb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index 4c8a4f165461..2fa4bfeb495c 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -99,6 +99,7 @@ LIST_HEAD(db_command_table, db_command);
extern struct db_command_table db_cmd_table;
extern struct db_command_table db_show_table;
extern struct db_command_table db_show_all_table;
+extern struct db_command_table db_show_active_table;
/*
* Type signature for a function implementing a ddb command.