]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit74ff8ed9c7c6e456a270f722786a7fc30b23a4f7
treea8645c78975252d456c17685eb840ee74f504ac4
parent1962a50a3327429f16cc20829c8f9b054b2b011a
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: 8666c7454ab7 ("kprobes: Show address of kprobes if kallsyms does")
Fixes: 6edc0cc5dfc1 ("kprobes: Show blacklist addresses as same as kallsyms does")
Signed-off-by: Kees Cook <keescook@chromium.org>
kernel/kprobes.c