瀏覽代碼

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".
Nick Mathewson 9 年之前
父節點
當前提交
59fa0c2d99
共有 2 個文件被更改,包括 12 次插入0 次删除
  1. 4 0
      changes/bug16363
  2. 8 0
      src/common/sandbox.c

+ 4 - 0
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".

+ 8 - 0
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