diff mbox

[2/2] seccomp: add some basic shared memory syscalls to the whitelist

Message ID 20140115193858.10562.38583.stgit@localhost
State New
Headers show

Commit Message

Paul Moore Jan. 15, 2014, 7:38 p.m. UTC
PulseAudio requires the use of shared memory so add shmget(), shmat(),
and shmdt() to the syscall whitelist.

Reported-by: xuhan@redhat.com
Signed-off-by: Paul Moore <pmoore@redhat.com>
---
 qemu-seccomp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Eduardo Otubo Jan. 16, 2014, 3:53 p.m. UTC | #1
On 01/15/2014 05:38 PM, Paul Moore wrote:
> PulseAudio requires the use of shared memory so add shmget(), shmat(),
> and shmdt() to the syscall whitelist.
>
> Reported-by: xuhan@redhat.com
> Signed-off-by: Paul Moore <pmoore@redhat.com>
> ---
>   qemu-seccomp.c |    5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/qemu-seccomp.c b/qemu-seccomp.c
> index 89f244f..caa926e 100644
> --- a/qemu-seccomp.c
> +++ b/qemu-seccomp.c
> @@ -222,7 +222,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
>       { SCMP_SYS(io_destroy), 241 },
>       { SCMP_SYS(arch_prctl), 240 },
>       { SCMP_SYS(mkdir), 240 },
> -    { SCMP_SYS(fchmod), 240 }
> +    { SCMP_SYS(fchmod), 240 },
> +    { SCMP_SYS(shmget), 240 },
> +    { SCMP_SYS(shmat), 240 },
> +    { SCMP_SYS(shmdt), 240 }

ACK.
diff mbox

Patch

diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 89f244f..caa926e 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -222,7 +222,10 @@  static const struct QemuSeccompSyscall seccomp_whitelist[] = {
     { SCMP_SYS(io_destroy), 241 },
     { SCMP_SYS(arch_prctl), 240 },
     { SCMP_SYS(mkdir), 240 },
-    { SCMP_SYS(fchmod), 240 }
+    { SCMP_SYS(fchmod), 240 },
+    { SCMP_SYS(shmget), 240 },
+    { SCMP_SYS(shmat), 240 },
+    { SCMP_SYS(shmdt), 240 }
 };
 
 int seccomp_start(void)