Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1377104

[PATCH 3.16.y-ckt 06/17] include/linux/poison.h: fix LIST_POISON{1,2} offset

From Luis Henriques <luis.henriques@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 3.16.y-ckt 06/17] include/linux/poison.h: fix LIST_POISON{1,2} offset
Date 2016-04-12 20:20 +0200
Message-ID <rnb4T-3n3-53@gated-at.bofh.it> (permalink)
References <rnaVc-3iR-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.16.7-ckt27 -stable review patch.  If anyone has any objections, please let me know.

---8<------------------------------------------------------------

From: Vasily Kulikov <segoon@openwall.com>

commit 8a5e5e02fc83aaf67053ab53b359af08c6c49aaf upstream.

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

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>
Cc: Moritz Muehlenhoff <jmm@inutil.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 include/linux/poison.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/poison.h b/include/linux/poison.h
index 2110a81c5e2a..253c9b4198ef 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 **********/
 /*

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[3.16.y-ckt stable] Linux 3.16.7-ckt27 stable review Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:10 +0200
  [PATCH 3.16.y-ckt 14/17] x86/iopl/64: Properly context-switch IOPL on Xen PV Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:10 +0200
  [PATCH 3.16.y-ckt 13/17] cpu: Provide smpboot_thread_init() on !CONFIG_SMP kernels as well Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:10 +0200
  [PATCH 3.16.y-ckt 15/17] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:10 +0200
  [PATCH 3.16.y-ckt 16/17] drm/radeon: hold reference to fences in radeon_sa_bo_new (3.17 and older) Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:10 +0200
  [PATCH 3.16.y-ckt 04/17] ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:10 +0200
  [PATCH 3.16.y-ckt 09/17] ipr: Fix regression when loading firmware Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 02/17] Input: powermate - fix oops with malicious USB descriptors Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 05/17] ALSA: usb-audio: Add sanity checks for endpoint accesses Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 12/17] ceph: fix request time stamp encoding Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 10/17] Input: ati_remote2 - fix crashes on detecting device with invalid descriptor Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 07/17] cpu: Defer smpboot kthread unparking until CPU known to scheduler Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 03/17] USB: iowarrior: fix oops with malicious USB descriptors Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 11/17] USB: cdc-acm: more sanity checking Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 08/17] ipr: Fix out-of-bounds null overwrite Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 01/17] ipv4: Don't do expensive useless work during inetdev destroy. Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200
  [PATCH 3.16.y-ckt 06/17] include/linux/poison.h: fix LIST_POISON{1,2} offset Luis Henriques <luis.henriques@canonical.com> - 2016-04-12 20:20 +0200

csiph-web