proc: Fix ptrace-based permission checks for accessing task maps
authorCorey Wright <undefined@pobox.com>
Sun, 28 Feb 2016 08:42:39 +0000 (02:42 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:06:19 +0000 (15:06 -0800)
commitb048b93f0e5b249b0add0bde6ec7ec75a07eac9c
treeba5d3de0ddbfc46a050d8674d5bf081437085e59
parentdb9b6792736a57291901032e4a2036dfc9f0ab95
proc: Fix ptrace-based permission checks for accessing task maps

Modify mm_access() calls in fs/proc/task_mmu.c and fs/proc/task_nommu.c to
have the mode include PTRACE_MODE_FSCREDS so accessing /proc/pid/maps and
/proc/pid/pagemap is not denied to all users.

In backporting upstream commit caaee623 to pre-3.18 kernel versions it was
overlooked that mm_access() is used in fs/proc/task_*mmu.c as those calls
were removed in 3.18 (by upstream commit 29a40ace) and did not exist at the
time of the original commit.

Signed-off-by: Corey Wright <undefined@pobox.com>
Acked-by: Jann Horn <jann@thejh.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/task_mmu.c
fs/proc/task_nommu.c