• Eric W. Biederman's avatar
    ptrace: Don't allow accessing an undumpable mm · e71b4e06
    Eric W. Biederman authored
    commit 84d77d3f 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: default avatarAndy Lutomirski <luto@amacapital.net>
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e71b4e06
Name
Last commit
Last update
..
cplb-mpu Loading commit data...
cplb-nompu Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
asm-offsets.c Loading commit data...
bfin_dma.c Loading commit data...
bfin_gpio.c Loading commit data...
bfin_ksyms.c Loading commit data...
cplbinfo.c Loading commit data...
debug-mmrs.c Loading commit data...
dma-mapping.c Loading commit data...
dumpstack.c Loading commit data...
early_printk.c Loading commit data...
entry.S Loading commit data...
exception.c Loading commit data...
fixed_code.S Loading commit data...
flat.c Loading commit data...
ftrace-entry.S Loading commit data...
ftrace.c Loading commit data...
gptimers.c Loading commit data...
ipipe.c Loading commit data...
irqchip.c Loading commit data...
kgdb.c Loading commit data...
kgdb_test.c Loading commit data...
module.c Loading commit data...
nmi.c Loading commit data...
perf_event.c Loading commit data...
process.c Loading commit data...
pseudodbg.c Loading commit data...
ptrace.c Loading commit data...
reboot.c Loading commit data...
setup.c Loading commit data...
shadow_console.c Loading commit data...
signal.c Loading commit data...
stacktrace.c Loading commit data...
sys_bfin.c Loading commit data...
time-ts.c Loading commit data...
time.c Loading commit data...
trace.c Loading commit data...
traps.c Loading commit data...
vmlinux.lds.S Loading commit data...