Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 27 Sep 2016 15:35:17 -0700
From: "LeMay, Michael" <>
To: "" <>
Subject: [RFC PATCH 2/7] avoid invoking the vDSO when SafeStack is enabled

The Linux vDSO code may be incompatible with programs that enable
segmentation-hardened SafeStack.  This patch prevents the vDSO from
being invoked when segmentation-hardened SafeStack is enabled.

Signed-off-by: Michael LeMay <>
  arch/i386/syscall_arch.h | 13 +++++++++++++
  1 file changed, 13 insertions(+)

diff --git a/arch/i386/syscall_arch.h b/arch/i386/syscall_arch.h
index 4c9d874..08e0910 100644
--- a/arch/i386/syscall_arch.h
+++ b/arch/i386/syscall_arch.h
@@ -52,8 +52,21 @@ static inline long __syscall6(long n, long a1, long 
a2, long a3, long a4, long a
      return __ret;

+/* The vDSO is not compiled with segmentation-hardened SafeStack.  Avoid
+ * invoking the vDSO when hardened SafeStack is enabled, since it may 
try to
+ * access the stack using memory operands with base registers other 
than EBP or
+ * ESP without also using a stack segment override prefix.  A special 
+ * pass needs to be used to add such prefixes, and it is unlikely that 
a pass
+ * of that sort was applied when the vDSO was compiled.
+ *
+ * A possible alternative to disabling the use of the vDSO may be to 
load the
+ * default flat data segment into DS prior to invoking the vDSO and 
+ * the restricted data segment into DS after the vDSO routine returns.
+ */
  #define VDSO_USEFUL
  #define VDSO_CGT_SYM "__vdso_clock_gettime"
  #define VDSO_CGT_VER "LINUX_2.6"


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.