summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-06-15 10:13:11 -0400
committerNick Mathewson <nickm@torproject.org>2015-06-15 10:13:11 -0400
commit59fa0c2d996621af5c6990534fe9a07864882975 (patch)
tree6406997c150408c5c827663544bceb3e614f4a96
parent1eb2c0cbd3a9be2650419bd07474770629261f56 (diff)
downloadtor-59fa0c2d996621af5c6990534fe9a07864882975.tar.gz
tor-59fa0c2d996621af5c6990534fe9a07864882975.zip
Fix another seccomp2 issue
Allow pipe() and pipe2() syscalls; we need these when eventfd2() support is missing. Fixes bug 16363; bugfix on 0.2.6.3-alpha. Patch from "teor".
-rw-r--r--changes/bug163634
-rw-r--r--src/common/sandbox.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/changes/bug16363 b/changes/bug16363
new file mode 100644
index 0000000000..1a6f8c6eff
--- /dev/null
+++ b/changes/bug16363
@@ -0,0 +1,4 @@
+ o Minor bugfixes (Linux seccomp2 sandbox):
+ - Allow pipe() and pipe2() syscalls; we need these when eventfd2()
+ support is missing. Fixes bug 16363; bugfix on 0.2.6.3-alpha.
+ Patch from "teor".
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index cdb4521c82..161eab7aad 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -129,7 +129,15 @@ static int filter_nopar_gen[] = {
SCMP_SYS(clone),
SCMP_SYS(epoll_create),
SCMP_SYS(epoll_wait),
+#ifdef HAVE_EVENTFD
SCMP_SYS(eventfd2),
+#endif
+#ifdef HAVE_PIPE2
+ SCMP_SYS(pipe2),
+#endif
+#ifdef HAVE_PIPE
+ SCMP_SYS(pipe),
+#endif
SCMP_SYS(fcntl),
SCMP_SYS(fstat),
#ifdef __NR_fstat64