kprobes: Do not expose probe addresses to non-CAP_SYSLOG
authorKees Cook <keescook@chromium.org>
Thu, 2 Jul 2020 22:20:22 +0000 (15:20 -0700)
committerKees Cook <keescook@chromium.org>
Wed, 8 Jul 2020 23:00:22 +0000 (16:00 -0700)
commit60f7bb66b88b649433bf700acfc60c3f24953871
treea8645c78975252d456c17685eb840ee74f504ac4
parentb25a7c5af9051850d4f3d93ca500056ab6ec724b
kprobes: Do not expose probe addresses to non-CAP_SYSLOG

The kprobe show() functions were using "current"'s creds instead
of the file opener's creds for kallsyms visibility. Fix to use
seq_file->file->f_cred.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
Fixes: 81365a947de4 ("kprobes: Show address of kprobes if kallsyms does")
Fixes: ffb9bd68ebdb ("kprobes: Show blacklist addresses as same as kallsyms does")
Signed-off-by: Kees Cook <keescook@chromium.org>
kernel/kprobes.c