[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] For me, asan/ubsan require more syscalls.



commit b9a43c8f43c84c99528d7f37f09abbd42482ae57
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Sep 5 14:25:58 2016 -0400

    For me, asan/ubsan require more syscalls.
    
    Permit sched_yield() and sigaltstack() in the sandbox.
    
    Closes ticket 20063
---
 changes/bug20063     | 6 ++++++
 src/common/sandbox.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/changes/bug20063 b/changes/bug20063
new file mode 100644
index 0000000..aa9ec23
--- /dev/null
+++ b/changes/bug20063
@@ -0,0 +1,6 @@
+  o Minor bugfixes (Linux seccomp2 sandbox):
+    - Add permission to run the sched_yield() and sigaltstack() system
+      calls, in order to support versions of Tor compiled with
+      asan or ubsan code that use these calls. Now "sandbox 1" and
+      "--enable-expensive-hardening" should be compatible.
+      Fixes bug 20063; bugfix on 0.2.5.1-alpha.
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index 37c1a94..24ba8a2 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -184,11 +184,17 @@ static int filter_nopar_gen[] = {
     SCMP_SYS(read),
     SCMP_SYS(rt_sigreturn),
     SCMP_SYS(sched_getaffinity),
+#ifdef __NR_sched_yield
+    SCMP_SYS(sched_yield),
+#endif
     SCMP_SYS(sendmsg),
     SCMP_SYS(set_robust_list),
 #ifdef __NR_setrlimit
     SCMP_SYS(setrlimit),
 #endif
+#ifdef __NR_sigaltstack
+    SCMP_SYS(sigaltstack),
+#endif
 #ifdef __NR_sigreturn
     SCMP_SYS(sigreturn),
 #endif



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits