* [Qemu-devel] [PULL 01/02] seccomp: add mkdir() and fchmod() to the whitelist
2014-01-20 15:16 [Qemu-devel] [PULL 00/02] QEMU/seccomp fixes for PulseAudio Eduardo Otubo
@ 2014-01-20 15:16 ` Eduardo Otubo
2014-01-20 15:16 ` [Qemu-devel] [PULL 02/02] seccomp: add some basic shared memory syscalls " Eduardo Otubo
1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Otubo @ 2014-01-20 15:16 UTC (permalink / raw)
To: qemu-devel; +Cc: pmoore, anthony
From: Paul Moore <pmoore@redhat.com>
The PulseAudio library attempts to do a mkdir(2) and fchmod(2) on
"/run/user/<UID>/pulse" which is currently blocked by the syscall
filter; this patch adds the two missing syscalls to the whitelist.
You can reproduce this problem with the following command:
# qemu -monitor stdio -device intel-hda -device hda-duplex
If watched under strace the following syscalls are shown:
mkdir("/run/user/0/pulse", 0700)
fchmod(11, 0700) [NOTE: 11 is the fd for /run/user/0/pulse]
Reported-by: xuhan@redhat.com
Signed-off-by: Paul Moore <pmoore@redhat.com>
Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
---
qemu-seccomp.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index b7c1253..89f244f 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -220,7 +220,9 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(io_cancel), 241 },
{ SCMP_SYS(io_setup), 241 },
{ SCMP_SYS(io_destroy), 241 },
- { SCMP_SYS(arch_prctl), 240 }
+ { SCMP_SYS(arch_prctl), 240 },
+ { SCMP_SYS(mkdir), 240 },
+ { SCMP_SYS(fchmod), 240 }
};
int seccomp_start(void)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL 02/02] seccomp: add some basic shared memory syscalls to the whitelist
2014-01-20 15:16 [Qemu-devel] [PULL 00/02] QEMU/seccomp fixes for PulseAudio Eduardo Otubo
2014-01-20 15:16 ` [Qemu-devel] [PULL 01/02] seccomp: add mkdir() and fchmod() to the whitelist Eduardo Otubo
@ 2014-01-20 15:16 ` Eduardo Otubo
1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Otubo @ 2014-01-20 15:16 UTC (permalink / raw)
To: qemu-devel; +Cc: pmoore, anthony
From: Paul Moore <pmoore@redhat.com>
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>
Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
---
qemu-seccomp.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
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)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread