1
0
Fork 0
remarkable-linux/arch/ia64
Eric W. Biederman e71b4e061c ptrace: Don't allow accessing an undumpable mm
commit 84d77d3f06 upstream.

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
Reported-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-06 10:40:13 +01:00
..
configs [IA64] refresh arch/ia64/configs/* using "make savedefconfig" 2014-09-23 11:09:29 -07:00
dig Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
hp [kbuild] handle exports in lib-y objects reliably 2016-08-07 23:46:30 -04:00
include Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-10-14 14:26:58 -07:00
kernel ptrace: Don't allow accessing an undumpable mm 2017-01-06 10:40:13 +01:00
lib ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
mm mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
oprofile Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pci PCI: Set ROM shadow location in arch code, not in PCI core 2016-03-08 12:14:31 -06:00
scripts ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
sn dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
uv ia64: change to new flag variables 2011-03-17 14:02:56 +01:00
Kconfig Implements HARDENED_USERCOPY verification of copy_to_user/copy_from_user 2016-08-08 14:48:14 -07:00
Kconfig.debug
Makefile kbuild: drop redundant "PHONY += FORCE" 2016-04-20 10:38:40 +02:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
module.lds