diff options
author | Sebastian Schmidt <yath@yath.de> | 2014-10-19 22:05:15 +0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2014-11-05 20:59:48 +0300 |
commit | 68c4a4f8abc60c9440ede9cd123d48b78325f7a3 (patch) | |
tree | ef8aefb7d8c3769204116ff65cfa48551464a275 /kernel/printk | |
parent | a28726b4fb624f81d637a8afb9ea12fc16500f61 (diff) | |
download | linux-68c4a4f8abc60c9440ede9cd123d48b78325f7a3.tar.xz |
pstore: Honor dmesg_restrict sysctl on dmesg dumps
When the kernel.dmesg_restrict restriction is in place, only users with
CAP_SYSLOG should be able to access crash dumps (like: attacker is
trying to exploit a bug, watchdog reboots, attacker can happily read
crash dumps and logs).
This puts the restriction on console-* types as well as sensitive
information could have been leaked there.
Other log types are unaffected.
Signed-off-by: Sebastian Schmidt <yath@yath.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'kernel/printk')
-rw-r--r-- | kernel/printk/printk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index ced2b84b1cb7..c8755e7e1dba 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -480,7 +480,7 @@ static int syslog_action_restricted(int type) type != SYSLOG_ACTION_SIZE_BUFFER; } -static int check_syslog_permissions(int type, bool from_file) +int check_syslog_permissions(int type, bool from_file) { /* * If this is from /proc/kmsg and we've already opened it, then we've |