Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1347722
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.10 14/80] proc: Fix ptrace-based permission checks for accessing task maps |
| Date | 2016-03-02 03:40 +0100 |
| Message-ID | <r84RJ-1dc-43@gated-at.bofh.it> (permalink) |
| References | <r82dd-7Iy-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Corey Wright <undefined@pobox.com>
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 | 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
@@ -170,7 +170,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);
@@ -1044,7 +1044,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
@@ -223,7 +223,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;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.10 00/80] 3.10.99-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 08/80] dm thin metadata: fix bug when taking a metadata snapshot Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 02/80] drm/ast: Initialized data needed to map fbdev memory Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 23/80] dts: vt8500: Add SDHC node to DTS file for WM8650 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 07/80] efi: Disable interrupts around EFI calls, not in the epilog/prolog calls Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 31/80] mac: validate mac_partition is within sector Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 14/80] proc: Fix ptrace-based permission checks for accessing task maps Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 29/80] megaraid_sas : SMAP restriction--do not access user memory from IOCTL code Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 32/80] ARC: dw2 unwind: Remove falllback linear search thru FDE entries Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 11/80] USB: cp210x: add IDs for GE B650V3 and B850V3 boards Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 41/80] dm btree: fix bufio buffer leaks in dm_btree_del() error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 27/80] wm831x_power: Use IRQF_ONESHOT to request threaded IRQs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 10/80] can: ems_usb: Fix possible tx overflow Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 01/80] tracepoints: Do not trace when cpu is offline Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 06/80] drm/radeon: fix hotplug race at startup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 26/80] devres: fix a for loop bounds check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 30/80] mmc: remove bondage between REQ_META and reliable write Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 15/80] iw_cxgb3: Fix incorrectly returning error on success Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 35/80] virtio: fix memory leak of virtio ida cache layers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:40 +0100
[PATCH 3.10 04/80] bcache: unregister reboot notifier if bcache fails to unregister device Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 03:50 +0100
Re: [PATCH 3.10 00/80] 3.10.99-stable review Guenter Roeck <linux@roeck-us.net> - 2016-03-02 15:40 +0100
Re: [PATCH 3.10 00/80] 3.10.99-stable review Willy Tarreau <w@1wt.eu> - 2016-03-02 16:50 +0100
Re: [PATCH 3.10 00/80] 3.10.99-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 18:30 +0100
csiph-web