aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Kulikov <segoon@openwall.com>2016-01-08 11:19:14 -0500
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-03-18 01:51:05 +0100
commit2ec4bf02eca166ffef86d85732bb5bfc0f6b64d9 (patch)
tree4f6fd702ae4683829d6bc53491c0ab8348fdfc93
parent8488e8e35c1cad73257500e300873083c951d9d6 (diff)
downloadkernel_samsung_smdk4412-2ec4bf02eca166ffef86d85732bb5bfc0f6b64d9.zip
kernel_samsung_smdk4412-2ec4bf02eca166ffef86d85732bb5bfc0f6b64d9.tar.gz
kernel_samsung_smdk4412-2ec4bf02eca166ffef86d85732bb5bfc0f6b64d9.tar.bz2
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 Bug: 26186802 Change-Id: I2663f4e4d8725547c90ea14e082f10ae0cf80679 Signed-off-by: Yuan Lin <yualin@google.com>
-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 2110a81..253c9b4 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 **********/
/*