linux_dsm_epyc7002/arch/cris
Eric W. Biederman 84d77d3f06 ptrace: Don't allow accessing an undumpable mm
It is the reasonable expectation that if an executable file is not
readable there will be no way for a user without special privileges to
read the file.  This is enforced in ptrace_attach but if ptrace
is already attached before exec there is no enforcement for read-only
executables.

As the only way to read such an mm is through access_process_vm
spin a variant called ptrace_access_vm that will fail if the
target process is not being ptraced by the current process, or
the current process did not have sufficient privileges when ptracing
began to read the target processes mm.

In the ptrace implementations replace access_process_vm by
ptrace_access_vm.  There remain several ptrace sites that still use
access_process_vm as they are reading the target executables
instructions (for kernel consumption) or register stacks.  As such it
does not appear necessary to add a permission check to those calls.

This bug has always existed in Linux.

Fixes: v1.0
Cc: stable@vger.kernel.org
Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2016-11-22 12:57:38 -06:00
..
arch-v10 Fix typo 2016-09-23 15:42:05 +02:00
arch-v32 ptrace: Don't allow accessing an undumpable mm 2016-11-22 12:57:38 -06:00
boot CRIS: Drop code related to obsolete or unused kconfigs 2015-11-02 20:03:05 +01:00
configs CRIS: defconfig: remove MTDRAM_ABS_POS 2016-09-23 16:01:55 +02:00
include Fix typo 2016-09-23 15:42:10 +02:00
kernel nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
mm cris: migrate exception table users off module.h and onto extable.h 2016-09-23 15:33:38 +02:00
Kconfig cris: fix Kconfig mismatch when building with CONFIG_PCI 2016-09-22 16:43:17 +02:00
Kconfig.debug Kconfig: remove a few puzzling comments 2011-10-31 10:58:48 +01:00
Makefile CRISv32: add device tree support 2015-03-25 09:49:48 +01:00