From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail177-1.suw61.mandrillapp.com ([198.2.177.1]:5072 "EHLO mail177-1.suw61.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbcCAIQI (ORCPT ); Tue, 1 Mar 2016 03:16:08 -0500 Received: from pmta06.mandrill.prod.suw01.rsglab.com (127.0.0.1) by mail177-1.suw61.mandrillapp.com id hql7sg22rtk7 for ; Tue, 1 Mar 2016 08:15:47 +0000 (envelope-from ) From: Subject: Patch "proc: Fix ptrace-based permission checks for accessing task maps" has been added to the 3.14-stable tree To: , , Cc: , In-Reply-To: <20160228024239.c82b6c2db17c670611ee6b16@pobox.com> Message-Id: <145681500713497@kroah.com> Date: Tue, 01 Mar 2016 08:15:47 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled proc: Fix ptrace-based permission checks for accessing task maps to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: proc-fix-ptrace-based-permission-checks-for-accessing-task-maps.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From undefined@pobox.com Mon Feb 29 22:02:13 2016 From: Corey Wright Date: Sun, 28 Feb 2016 02:42:39 -0600 Subject: proc: Fix ptrace-based permission checks for accessing task maps To: stable@vger.kernel.org Cc: Jann Horn Message-ID: <20160228024239.c82b6c2db17c670611ee6b16@pobox.com> From: Corey Wright 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 Acked-by: Jann Horn Signed-off-by: Greg Kroah-Hartman --- fs/proc/task_mmu.c | 4 ++-- fs/proc/task_nommu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -165,7 +165,7 @@ static void *m_start(struct seq_file *m, if (!priv->task) return ERR_PTR(-ESRCH); - mm = mm_access(priv->task, PTRACE_MODE_READ); + mm = mm_access(priv->task, PTRACE_MODE_READ_FSCREDS); if (!mm || IS_ERR(mm)) return mm; down_read(&mm->mmap_sem); @@ -1182,7 +1182,7 @@ static ssize_t pagemap_read(struct file if (!pm.buffer) goto out_task; - mm = mm_access(task, PTRACE_MODE_READ); + mm = mm_access(task, PTRACE_MODE_READ_FSCREDS); ret = PTR_ERR(mm); if (!mm || IS_ERR(mm)) goto out_free; --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c @@ -216,7 +216,7 @@ static void *m_start(struct seq_file *m, if (!priv->task) return ERR_PTR(-ESRCH); - mm = mm_access(priv->task, PTRACE_MODE_READ); + mm = mm_access(priv->task, PTRACE_MODE_READ_FSCREDS); if (!mm || IS_ERR(mm)) { put_task_struct(priv->task); priv->task = NULL; Patches currently in stable-queue which might be from undefined@pobox.com are queue-3.14/proc-fix-ptrace-based-permission-checks-for-accessing-task-maps.patch