+ proc-kcore-fix-invalid-memory-access-in-multi-page-read-optimization-v3.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/proc/kcore.c: fix invalid memory access in multi-page read optimization
has been added to the -mm tree.  Its filename is
     proc-kcore-fix-invalid-memory-access-in-multi-page-read-optimization-v3.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/proc-kcore-fix-invalid-memory-access-in-multi-page-read-optimization-v3.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/proc-kcore-fix-invalid-memory-access-in-multi-page-read-optimization-v3.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>
Subject: fs/proc/kcore.c: fix invalid memory access in multi-page read optimization

The 'm' kcore_list item could point to kclist_head, and it is incorrect to
look at m->addr / m->size in this case.

There is no choice but to run through the list of entries for every
address if we did not find any entry in the previous iteration

Reset 'm' to NULL in that case at Omar Sandoval's suggestion.

Link: http://lkml.kernel.org/r/1536100702-28706-1-git-send-email-asmadeus@xxxxxxxxxxxxx
Fixes: bf991c2231117 ("proc/kcore: optimize multiple page reads")
Signed-off-by: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Omar Sandoval <osandov@xxxxxxxxxxx>
Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Cc: Eric Biederman <ebiederm@xxxxxxxxxxxx>
Cc: James Morse <james.morse@xxxxxxx>
Cc: Bhupesh Sharma <bhsharma@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/kcore.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/proc/kcore.c~proc-kcore-fix-invalid-memory-access-in-multi-page-read-optimization-v3
+++ a/fs/proc/kcore.c
@@ -464,6 +464,7 @@ read_kcore(struct file *file, char __use
 				ret = -EFAULT;
 				goto out;
 			}
+			m = NULL;
 		} else if (m->type == KCORE_VMALLOC) {
 			vread(buf, (char *)start, tsz);
 			/* we have to zero-fill user buffer even if no read */
_

Patches currently in -mm which might be from asmadeus@xxxxxxxxxxxxx are

proc-kcore-fix-invalid-memory-access-in-multi-page-read-optimization-v3.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux