Skip to contentSkip to conversation

kexec-ensure-user-memory-sizes-do-not-wrap.patch removed from -mm tree

merged [email protected] 1 participant 1 message Aug 3, 2016

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kexec: ensure user memory sizes do not wrap
has been removed from the -mm tree. Its filename was
kexec-ensure-user-memory-sizes-do-not-wrap.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Russell King <[email protected]>
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.

[[email protected]: fix it for kexec-return-error-number-directly.patch]
Cc Keerthy <[email protected]>
Cc Vitaly Andrianov <[email protected]>
Cc Eric Biederman <[email protected]>
Cc Dave Young <[email protected]>
Cc Vivek Goyal <[email protected]>
Cc Simon Horman <[email protected]>

---

 kernel/kexec_core.c |    2 ++
 1 file changed, 2 insertions(+)
kernel/kexec_core.c renamed from kernel/kexec_core.c~kexec-ensure-user-memory-sizes-do-not-wrap +2 -0
diff -puN kernel/kexec_core.c~kexec-ensure-user-memory-sizes-do-not-wrap 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 -EADDRNOTAVAIL;
 		if ((mstart & ~PAGE_MASK) || (mend & ~PAGE_MASK))
 			return -EADDRNOTAVAIL;
 		if (mend >= KEXEC_DESTINATION_MEMORY_LIMIT)

_

Patches currently in -mm which might be from [email protected] are