linux-stable/arch/blackfin
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
..
boot blackfin: Ignore generated uImages 2013-09-13 10:42:39 +08:00
configs bf609: enable soft switch gpio driver by default 2015-04-23 21:34:29 +08:00
include blackfin: no access_ok() for __copy_{to,from}_user() 2016-09-15 19:51:57 -04:00
kernel ptrace: Don't allow accessing an undumpable mm 2016-11-22 12:57:38 -06:00
lib Blackfin: comment spelling s/divsor/divisor/ 2016-04-18 12:51:57 +02:00
mach-bf518 blackfin: cleanup board files 2014-04-12 08:48:01 +08:00
mach-bf527 Input: ad7879 - move header to platform_data directory 2016-03-08 10:51:10 -08:00
mach-bf533 arch/blackfin/mach-bf533/boards/stamp.c: add linux/delay.h 2015-01-08 15:10:52 -08:00
mach-bf537 Linux 4.5 2016-03-15 16:54:45 -07:00
mach-bf538 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-03-17 21:51:52 -07:00
mach-bf548 gpio: Include linux/gpio.h instead of asm/gpio.h 2016-02-16 00:20:03 +01:00
mach-bf561 Merge 4.8-rc5 into char-misc-next 2016-09-05 08:04:07 +02:00
mach-bf609 [media] ezkit/cobalt: drop unused op_656_range setting 2016-07-12 13:36:09 -03:00
mach-common This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
mm treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
oprofile
Clear_BSD.txt
Kconfig blackfin: do away with ARCH_REQUIRE_GPIOLIB 2016-08-08 09:50:00 +02:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile blackfin: rename vmImage to uImage after we move to buildroot 2013-05-07 18:26:39 +08:00