-
- Downloads
restrict reading from /proc/<pid>/maps to those who share ->mm or can ptrace pid
Contents of /proc/*/maps is sensitive and may become sensitive after open() (e.g. if target originally shares our ->mm and later does exec on suid-root binary). Check at read() (actually, ->start() of iterator) time that mm_struct we'd grabbed and locked is - still the ->mm of target - equal to reader's ->mm or the target is ptracable by reader. Signed-off-by:Al Viro <viro@zeniv.linux.org.uk> Acked-by:
Rik van Riel <riel@redhat.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- fs/proc/base.c 20 additions, 0 deletionsfs/proc/base.c
- fs/proc/internal.h 2 additions, 0 deletionsfs/proc/internal.h
- fs/proc/task_mmu.c 1 addition, 2 deletionsfs/proc/task_mmu.c
- fs/proc/task_nommu.c 1 addition, 3 deletionsfs/proc/task_nommu.c
- include/linux/ptrace.h 1 addition, 0 deletionsinclude/linux/ptrace.h
- kernel/ptrace.c 2 additions, 2 deletionskernel/ptrace.c
Loading
Please register or sign in to comment