linux_dsm_epyc7002/arch/cris/arch-v32
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
..
drivers cris/arch-v32: cryptocop: print a hex number after a 0x prefix 2016-10-27 18:43:43 -07:00
kernel ptrace: Don't allow accessing an undumpable mm 2016-11-22 12:57:38 -06:00
lib CRIS: remove SMP code 2015-03-25 10:55:10 +01:00
mach-a3 CRIS v32: remove some double unlocks 2016-09-23 16:00:04 +02:00
mach-fs CRIS v32: remove some double unlocks 2016-09-23 16:00:04 +02:00
mm cris: intmem: fix pointer comparison compile warning 2016-09-22 16:11:18 +02:00
Kconfig CRIS v32: remove old GPIO and LEDs code 2015-11-02 20:03:05 +01:00
output_arch.ld [PATCH] CRIS update: new subarchitecture v32 2005-07-27 16:26:01 -07:00