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>
This commit is contained in:
@@ -27,6 +27,8 @@ struct vmalloc_info {
|
||||
unsigned long largest_chunk;
|
||||
};
|
||||
|
||||
extern struct mm_struct *mm_for_maps(struct task_struct *);
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
|
||||
extern void get_vmalloc_info(struct vmalloc_info *vmi);
|
||||
|
Reference in New Issue
Block a user