linux/arch/ia64/kernel
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
..
.gitignore
acpi-ext.c ACPICA: Resources: Provide common part for struct acpi_resource_address structures. 2015-01-26 16:09:56 +01:00
acpi.c x86/acpi: Set persistent cpuid <-> nodeid mapping when booting 2016-09-21 21:18:39 +02:00
asm-offsets.c ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
audit.c
brl_emu.c
crash_dump.c
crash.c ia64: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:15 -07:00
cyclone.c arch, drivers: don't include <asm/io.h> directly, use <linux/io.h> instead 2015-08-10 23:07:05 -04:00
dma-mapping.c
efi_stub.S
efi.c ia64: efi: use timespec64 for persistent clock 2016-06-17 13:45:05 -07:00
elfcore.c switch elf_core_write_extra_data() to dump_emit() 2013-11-09 00:16:23 -05:00
entry.h
entry.S ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
err_inject.c mm: replace get_user_pages() write/force parameters with gup_flags 2016-10-19 08:11:43 -07:00
esi_stub.S ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
esi.c
fsys.S ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
fsyscall_gtod_data.h
ftrace.c ia64: ftrace: Fix the comments for ftrace_modify_code() 2015-12-23 14:27:23 -05:00
gate-data.S
gate.lds.S ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
gate.S ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
head.S ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
ia64_ksyms.c ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
init_task.c fix up initial thread stack pointer vs thread_info confusion 2016-06-24 17:07:33 -07:00
iosapic.c ia64: rename nop->iosapic_nop 2016-01-12 20:46:47 +02:00
irq_ia64.c ia64: remove deprecated cpus_ usage. 2015-03-10 13:54:38 +10:30
irq_lsapic.c
irq.c ia64/irq: Use access helper irq_data_get_affinity_mask() 2015-07-27 13:36:37 +02:00
ivt.S ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
jprobes.S
kprobes.c ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
machine_kexec.c kdump: arrange for paddr_vmcoreinfo_note() to return phys_addr_t 2016-08-02 19:35:27 -04:00
machvec.c
Makefile ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
Makefile.gate
mca_asm.S
mca_drv_asm.S
mca_drv.c
mca_drv.h
mca.c Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 19:43:08 -07:00
minstate.h ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
module.c module: use a structure to encapsulate layout. 2015-12-04 22:46:25 +01:00
msi_ia64.c ia64/irq: Use access helper irq_data_get_affinity_mask() 2015-07-27 13:36:37 +02:00
nr-irqs.c ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
numa.c ia64: fix up obsolete cpu function usage. 2015-03-05 15:25:04 +10:30
pal.S ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
palinfo.c ia64, palinfo: Fix CPU hotplug callback registration 2014-03-20 13:43:40 +01:00
patch.c ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
pci-dma.c
pci-swiotlb.c dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
perfmon_default_smpl.c
perfmon_generic.h
perfmon_itanium.h
perfmon_mckinley.h
perfmon_montecito.h
perfmon.c exit_thread: accept a task parameter to be exited 2016-05-20 17:58:30 -07:00
process.c exit_thread: accept a task parameter to be exited 2016-05-20 17:58:30 -07:00
ptrace.c ptrace: Don't allow accessing an undumpable mm 2016-11-22 12:57:38 -06:00
relocate_kernel.S
sal.c
salinfo.c ia64: salinfo: use a waitqueue instead a sema down/up combo 2016-07-25 09:55:32 -07:00
setup.c ia64: move exports to definitions 2016-08-07 23:55:50 -04:00
sigframe.h
signal.c all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
smp.c ia64: fix up obsolete cpu function usage. 2015-03-05 15:25:04 +10:30
smpboot.c arch/hotplug: Call into idle with a proper state 2016-03-01 20:36:57 +01:00
stacktrace.c
sys_ia64.c
time.c ia64: efi: use timespec64 for persistent clock 2016-06-17 13:45:05 -07:00
topology.c ia64: fix up obsolete cpu function usage. 2015-03-05 15:25:04 +10:30
traps.c ia64/traps: Silence GCC warning about uninitialised variable 2016-05-05 10:29:14 -07:00
unaligned.c ia64/unaligned: Silence another GCC warning about an uninitialised variable 2016-05-05 10:29:14 -07:00
uncached.c mm: rename alloc_pages_exact_node() to __alloc_pages_node() 2015-09-08 15:35:28 -07:00
unwind_decoder.c
unwind_i.h
unwind.c
vmlinux.lds.S nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00