+ kexec-ensure-user-memory-sizes-do-not-wrap.patch added to -mm tree

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

 



The patch titled
     Subject: kexec: ensure user memory sizes do not wrap
has been added to the -mm tree.  Its filename is
     kexec-ensure-user-memory-sizes-do-not-wrap.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kexec-ensure-user-memory-sizes-do-not-wrap.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kexec-ensure-user-memory-sizes-do-not-wrap.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
Subject: kexec: ensure user memory sizes do not wrap

Ensure that user memory sizes do not wrap around when validating the user
input, which can lead to the following input validation working
incorrectly.

Link: http://lkml.kernel.org/r/E1b8koF-0004HM-5x@xxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
Reviewed-by: Pratyush Anand <panand@xxxxxxxxxx>
Acked-by: Baoquan He <bhe@xxxxxxxxxx>
Cc: Keerthy <j-keerthy@xxxxxx>
Cc: Vitaly Andrianov <vitalya@xxxxxx>
Cc: Eric Biederman <ebiederm@xxxxxxxxxxxx>
Cc: Dave Young <dyoung@xxxxxxxxxx>
Cc: Vivek Goyal <vgoyal@xxxxxxxxxx>
Cc: Simon Horman <horms@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/kexec_core.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN kernel/kexec_core.c~kexec-ensure-user-memory-sizes-do-not-wrap kernel/kexec_core.c
--- a/kernel/kexec_core.c~kexec-ensure-user-memory-sizes-do-not-wrap
+++ a/kernel/kexec_core.c
@@ -168,6 +168,8 @@ int sanity_check_segment_list(struct kim
 
 		mstart = image->segment[i].mem;
 		mend   = mstart + image->segment[i].memsz;
+		if (mstart > mend)
+			return result;
 		if ((mstart & ~PAGE_MASK) || (mend & ~PAGE_MASK))
 			return -EADDRNOTAVAIL;
 		if (mend >= KEXEC_DESTINATION_MEMORY_LIMIT)
_

Patches currently in -mm which might be from rmk+kernel@xxxxxxxxxxxxxxxx are

arm-kdump-advertise-boot-aliased-crash-kernel-resource.patch
arm-kexec-advertise-location-of-bootable-ram.patch
kexec-dont-invoke-oom-killer-for-control-page-allocation.patch
kexec-ensure-user-memory-sizes-do-not-wrap.patch
kdump-arrange-for-paddr_vmcoreinfo_note-to-return-phys_addr_t.patch
kexec-allow-architectures-to-override-boot-mapping.patch
arm-kexec-fix-kexec-for-keystone-2.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux