Skip to contentSkip to conversation

seccomp: add arch_prctl() to the syscall whitelist

PATCH Applied Paul Moore 3 participants 5 messages Jul 18, 2013 – Aug 2, 2013

lore
Share & tools
lore

Paul Moore

author
#0 lore raw

PATCH 1/1 seccomp: add arch_prctl() to the syscall whitelist

It appears that even a very simple /etc/qemu-ifup configuration can require the arch_prctl() syscall, see the example below:

	#!/bin/sh
	/sbin/ifconfig $1 0.0.0.0 up
	/usr/sbin/brctl addif <switch> $1
---
 qemu-seccomp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
qemu-seccomp.c +2 -1
index 173d185..9e91c73 100644
@@ -234,7 +234,8 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
     { SCMP_SYS(waitid), 241 },
     { SCMP_SYS(io_cancel), 241 },
     { SCMP_SYS(io_setup), 241 },
-    { SCMP_SYS(io_destroy), 241 }
+    { SCMP_SYS(io_destroy), 241 },
+    { SCMP_SYS(arch_prctl), 240 }
 };
 
 int seccomp_start(void)
author
#1 lore raw
Quoted 8 lines · Paul Moore

It appears that even a very simple /etc/qemu-ifup configuration can require the arch_prctl() syscall, see the example below:

	#!/bin/sh
	/sbin/ifconfig $1 0.0.0.0 up
	/usr/sbin/brctl addif <switch> $1

As with the other fix, a gentle nudge so this isn't forgotten.

Quoted 18 lines
---
 qemu-seccomp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
qemu-seccomp.c +2 -1
index 173d185..9e91c73 100644
@@ -234,7 +234,8 @@ static const struct QemuSeccompSyscall
 seccomp_whitelist[] = { { SCMP_SYS(waitid), 241 },
     { SCMP_SYS(io_cancel), 241 },
     { SCMP_SYS(io_setup), 241 },
-    { SCMP_SYS(io_destroy), 241 }
+    { SCMP_SYS(io_destroy), 241 },
+    { SCMP_SYS(arch_prctl), 240 }
 };
 
 int seccomp_start(void)
Signature · 2 lines
paul moore
security and virtualization @ redhat
Reviewed-by
#2 lore raw
Quoted 11 lines · Paul Moore
Quoted 8 lines · Paul Moore

It appears that even a very simple /etc/qemu-ifup configuration can require the arch_prctl() syscall, see the example below:

	#!/bin/sh
	/sbin/ifconfig $1 0.0.0.0 up
	/usr/sbin/brctl addif <switch> $1

As with the other fix, a gentle nudge so this isn't forgotten.

Reviewed and tested.

Quoted 19 lines
Quoted 19 lines
---
  qemu-seccomp.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
qemu-seccomp.c +2 -1
index 173d185..9e91c73 100644
@@ -234,7 +234,8 @@ static const struct QemuSeccompSyscall
 seccomp_whitelist[] = { { SCMP_SYS(waitid), 241 },
      { SCMP_SYS(io_cancel), 241 },
      { SCMP_SYS(io_setup), 241 },
-    { SCMP_SYS(io_destroy), 241 }
+    { SCMP_SYS(io_destroy), 241 },
+    { SCMP_SYS(arch_prctl), 240 }
  };
 
  int seccomp_start(void)
Signature · 2 lines
Eduardo Otubo
IBM Linux Technology Center
author
#3 lore raw
Quoted 9 lines · Eduardo Otubo
Quoted 8 lines · Paul Moore
Quoted 7 lines · Paul Moore

It appears that even a very simple /etc/qemu-ifup configuration can

require the arch_prctl() syscall, see the example below:

	#!/bin/sh
	/sbin/ifconfig $1 0.0.0.0 up
	/usr/sbin/brctl addif <switch> $1
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

As with the other fix, a gentle nudge so this isn't forgotten.

Reviewed and tested.

Any chance of merging this patch?

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines

---

  qemu-seccomp.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
qemu-seccomp.c +2 -1
index 173d185..9e91c73 100644
@@ -234,7 +234,8 @@ static const struct QemuSeccompSyscall
 seccomp_whitelist[] = { { SCMP_SYS(waitid), 241 },
 
      { SCMP_SYS(io_cancel), 241 },
      { SCMP_SYS(io_setup), 241 },
 
-    { SCMP_SYS(io_destroy), 241 }
+    { SCMP_SYS(io_destroy), 241 },
+    { SCMP_SYS(arch_prctl), 240 }
 
  };

int seccomp_start(void)

Signature · 2 lines
paul moore
security and virtualization @ redhat