summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Kulikov <segoon@openwall.com>2015-09-09 15:36:00 -0700
committerAlain Vongsouvanh <alainv@google.com>2016-04-08 18:41:27 +0000
commit320c70eb96404e0b2287eb53de1eafc54d377b9a (patch)
treeb2bf0ccf9a0f88dd2d46a3395676aae269e9457f
parent4e1c5d1aaed0b80d2e560db257130108e656b7ee (diff)
downloadbcm-320c70eb96404e0b2287eb53de1eafc54d377b9a.tar.gz
include/linux/poison.h: fix LIST_POISON{1,2} offset
Poison pointer values should be small enough to find a room in non-mmap'able/hardly-mmap'able space. E.g. on x86 "poison pointer space" is located starting from 0x0. Given unprivileged users cannot mmap anything below mmap_min_addr, it should be safe to use poison pointers lower than mmap_min_addr. The current poison pointer values of LIST_POISON{1,2} might be too big for mmap_min_addr values equal or less than 1 MB (common case, e.g. Ubuntu uses only 0x10000). There is little point to use such a big value given the "poison pointer space" below 1 MB is not yet exhausted. Changing it to a smaller value solves the problem for small mmap_min_addr setups. The values are suggested by Solar Designer: http://www.openwall.com/lists/oss-security/2015/05/02/6 Issue: KIONE-3485 Change-Id: Id8d8a1b27978ea6e04a477af910d53694805fb8e Signed-off-by: Vasily Kulikov <segoon@openwall.com> Cc: Solar Designer <solar@openwall.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/poison.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/poison.h b/include/linux/poison.h
index 2110a81c5e2..253c9b4198e 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
@@ -19,8 +19,8 @@
* under normal circumstances, used to verify that nobody uses
* non-initialized list entries.
*/
-#define LIST_POISON1 ((void *) 0x00100100 + POISON_POINTER_DELTA)
-#define LIST_POISON2 ((void *) 0x00200200 + POISON_POINTER_DELTA)
+#define LIST_POISON1 ((void *) 0x100 + POISON_POINTER_DELTA)
+#define LIST_POISON2 ((void *) 0x200 + POISON_POINTER_DELTA)
/********** include/linux/timer.h **********/
/*