Skip to contentSkip to conversation

seccomp: add the asynchronous I/O syscalls to the whitelist

PATCH Applied Paul Moore 4 participants 6 messages May 29, 2013 – Jul 10, 2013

lore
Share & tools
lore

Paul Moore

author
#0 lore raw

PATCH 1/1 seccomp: add the asynchronous I/O syscalls to the whitelist

In order to enable the asynchronous I/O functionality when using the seccomp sandbox we need to add the associated syscalls to the whitelist.

---
 qemu-seccomp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
qemu-seccomp.c +4 -1
index 031da1d..ca123bf 100644
@@ -87,6 +87,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
     { SCMP_SYS(stat), 245 },
     { SCMP_SYS(uname), 245 },
     { SCMP_SYS(eventfd2), 245 },
+    { SCMP_SYS(io_getevents), 245 },
     { SCMP_SYS(dup), 245 },
     { SCMP_SYS(dup2), 245 },
     { SCMP_SYS(dup3), 245 },
@@ -229,7 +230,9 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
     { SCMP_SYS(sendmmsg), 241 },
     { SCMP_SYS(recvmmsg), 241 },
     { SCMP_SYS(prlimit64), 241 },
-    { SCMP_SYS(waitid), 241 }
+    { SCMP_SYS(waitid), 241 },
+    { SCMP_SYS(io_setup), 241 },
+    { SCMP_SYS(io_destroy), 241 }
 };
 
 int seccomp_start(void)
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Paul Moore

In order to enable the asynchronous I/O functionality when using the seccomp sandbox we need to add the associated syscalls to the whitelist.

---
  qemu-seccomp.c |    5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
qemu-seccomp.c +1 -0
index 031da1d..ca123bf 100644
@@ -87,6 +87,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
      { SCMP_SYS(stat), 245 },
      { SCMP_SYS(uname), 245 },
      { SCMP_SYS(eventfd2), 245 },
+    { SCMP_SYS(io_getevents), 245 },
      { SCMP_SYS(dup), 245 },
      { SCMP_SYS(dup2), 245 },
      { SCMP_SYS(dup3), 245 },

qemu-seccomp.c static const struct QemuSeccompSyscall seccomp_whitelist[] = { · line 238

Quoted 10 lines
qemu-seccomp.c +3 -1
@@ -229,7 +230,9 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
      { SCMP_SYS(sendmmsg), 241 },
      { SCMP_SYS(recvmmsg), 241 },
      { SCMP_SYS(prlimit64), 241 },
-    { SCMP_SYS(waitid), 241 }
+    { SCMP_SYS(waitid), 241 },
+    { SCMP_SYS(io_setup), 241 },
+    { SCMP_SYS(io_destroy), 241 }
  };
 
  int seccomp_start(void)

Thanks for the patch. It looks good to me and I see these are used by the block aio code.

Signature · 2 lines
Regards,
Corey Bryant
author
#3 lore raw
In reply to Paul Moore
Quoted 22 lines · Paul Moore

In order to enable the asynchronous I/O functionality when using the seccomp sandbox we need to add the associated syscalls to the whitelist.

---
 qemu-seccomp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
qemu-seccomp.c +1 -0
index 031da1d..ca123bf 100644
@@ -87,6 +87,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[]
 = { { SCMP_SYS(stat), 245 },
     { SCMP_SYS(uname), 245 },
     { SCMP_SYS(eventfd2), 245 },
+    { SCMP_SYS(io_getevents), 245 },
     { SCMP_SYS(dup), 245 },
     { SCMP_SYS(dup2), 245 },
     { SCMP_SYS(dup3), 245 },

qemu-seccomp.c static const struct QemuSeccompSyscall · line 238

Quoted 10 lines
qemu-seccomp.c +3 -1
@@ -229,7 +230,9 @@ static const struct QemuSeccompSyscall
 seccomp_whitelist[] = { { SCMP_SYS(sendmmsg), 241 },
     { SCMP_SYS(recvmmsg), 241 },
     { SCMP_SYS(prlimit64), 241 },
-    { SCMP_SYS(waitid), 241 }
+    { SCMP_SYS(waitid), 241 },
+    { SCMP_SYS(io_setup), 241 },
+    { SCMP_SYS(io_destroy), 241 }
 };
 
 int seccomp_start(void)

Any reason this patch wasn't pulled in for 1.5.1?

Signature · 2 lines
paul moore
security and virtualization @ redhat
#4 lore raw

Am 10.07.2013 16:31, schrieb Paul Moore:

Quoted 32 lines · Paul Moore
Quoted 31 lines

In order to enable the asynchronous I/O functionality when using the seccomp sandbox we need to add the associated syscalls to the whitelist.

---
 qemu-seccomp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
qemu-seccomp.c +4 -1
index 031da1d..ca123bf 100644
@@ -87,6 +87,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[]
 = { { SCMP_SYS(stat), 245 },
     { SCMP_SYS(uname), 245 },
     { SCMP_SYS(eventfd2), 245 },
+    { SCMP_SYS(io_getevents), 245 },
     { SCMP_SYS(dup), 245 },
     { SCMP_SYS(dup2), 245 },
     { SCMP_SYS(dup3), 245 },
@@ -229,7 +230,9 @@ static const struct QemuSeccompSyscall
 seccomp_whitelist[] = { { SCMP_SYS(sendmmsg), 241 },
     { SCMP_SYS(recvmmsg), 241 },
     { SCMP_SYS(prlimit64), 241 },
-    { SCMP_SYS(waitid), 241 }
+    { SCMP_SYS(waitid), 241 },
+    { SCMP_SYS(io_setup), 241 },
+    { SCMP_SYS(io_destroy), 241 }
 };
 
Quoted 3 lines

qemu-seccomp.c static const struct QemuSeccompSyscall seccomp_whitelist[] = { · line 238

Quoted 1 line
qemu-seccomp.c +0 -0
 int seccomp_start(void)

Any reason this patch wasn't pulled in for 1.5.1?

Yes: You forget to put a line Cc: [email protected] into the commit message nor was it ever CC'ed while on the list. ;)

Cheers,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
author
#5 lore raw
Quoted 39 lines · Andreas Färber

Am 10.07.2013 16:31, schrieb Paul Moore:

Quoted 38 lines · Paul Moore
Quoted 37 lines

In order to enable the asynchronous I/O functionality when using the seccomp sandbox we need to add the associated syscalls to the whitelist.

---

 qemu-seccomp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
qemu-seccomp.c +1 -0
index 031da1d..ca123bf 100644
@@ -87,6 +87,7 @@ static const struct QemuSeccompSyscall
 seccomp_whitelist[] = { { SCMP_SYS(stat), 245 },
 
     { SCMP_SYS(uname), 245 },
     { SCMP_SYS(eventfd2), 245 },
 
+    { SCMP_SYS(io_getevents), 245 },
 
     { SCMP_SYS(dup), 245 },
     { SCMP_SYS(dup2), 245 },
     { SCMP_SYS(dup3), 245 },
qemu-seccomp.c +3 -1
@@ -229,7 +230,9 @@ static const struct QemuSeccompSyscall
 seccomp_whitelist[] = { { SCMP_SYS(sendmmsg), 241 },
 
     { SCMP_SYS(recvmmsg), 241 },
     { SCMP_SYS(prlimit64), 241 },
 
-    { SCMP_SYS(waitid), 241 }
+    { SCMP_SYS(waitid), 241 },
+    { SCMP_SYS(io_setup), 241 },
+    { SCMP_SYS(io_destroy), 241 }
 
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

};

int seccomp_start(void)

Any reason this patch wasn't pulled in for 1.5.1?

Yes: You forget to put a line Cc: [email protected] into the commit message nor was it ever CC'ed while on the list. ;)

You learn something new everyday, thanks.

Can I assume this will make it into 1.5.2 now?

Signature · 2 lines
paul moore
security and virtualization @ redhat