]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 2 Mar 2016 09:29:36 +0000 (10:29 +0100)
commitfa69c2b418d7aaae8d14810caecc9bfe3f44b4e5
tree17b4e155cbc46a01cca92811e52dc429d1c446ee
parentbb47c5ece25da44126f06a0583cc836e2abbe1e4
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.

Fixes: caaee6234d ("ptrace: use fsuid, fsgid, effective creds for fs access checks")
Signed-off-by: Corey Wright <undefined@pobox.com>
Acked-by: Jann Horn <jann@thejh.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/proc/task_mmu.c
fs/proc/task_nommu.c