Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3f8d9836-e1ed-183c-5b51-e6407ad1fcff@intel.com>
Date: Tue, 27 Sep 2016 15:36:09 -0700
From: "LeMay, Michael" <michael.lemay@...el.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: [RFC PATCH 3/7] disable check for buggy brk implementations when
 SafeStack is enabled

The check relies on comparing the addresses of stack-allocated objects
to addresses returned by the brk syscall.  Segmentation-hardened
SafeStack moves the allocations to heap locations, breaking the check.
This patch disables the check when segmentation-hardened SafeStack is
enabled.

Signed-off-by: Michael LeMay <michael.lemay@...el.com>
---
  src/malloc/expand_heap.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/src/malloc/expand_heap.c b/src/malloc/expand_heap.c
index d8c0be7..ace2b6a 100644
--- a/src/malloc/expand_heap.c
+++ b/src/malloc/expand_heap.c
@@ -13,6 +13,7 @@

  static int traverses_stack_p(uintptr_t old, uintptr_t new)
  {
+#if !SAFE_STACK
      const uintptr_t len = 8<<20;
      uintptr_t a, b;

@@ -23,6 +24,7 @@ static int traverses_stack_p(uintptr_t old, uintptr_t new)
      b = (uintptr_t)&b;
      a = b > len ? b-len : 0;
      if (new>a && old<b) return 1;
+#endif

      return 0;
  }
-- 
2.7.4


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.