QEMU/seccomp fixes for PulseAudio
The following changes since commit 1cf892ca2689c84960b4ce4d2723b6bee453711c:
SPARC: Fix LEON3 power down instruction (2014-01-15 15:37:33 +1000)
are available in the git repository at:
git://github.com/otubo/qemu.git seccomp
Paul Moore (2):
seccomp: add mkdir() and fchmod() to the whitelist
seccomp: add some basic shared memory syscalls to the whitelist
qemu-seccomp.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
[Qemu-devel] [PULL 01/02] seccomp: add mkdir() and fchmod() to the whitelist
From: Paul Moore <[email protected]>
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]
--- qemu-seccomp.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
qemu-seccomp.c +3 -1
@@ -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 )
Signature · 1 line
1.7.1
[Qemu-devel] [PULL 02/02] seccomp: add some basic shared memory syscalls to the whitelist
In reply to Eduardo OtuboFrom: Paul Moore <[email protected]>
PulseAudio requires the use of shared memory so add shmget(), shmat(), and shmdt() to the syscall whitelist.
--- qemu-seccomp.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
qemu-seccomp.c +4 -1
@@ -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 )
Signature · 1 line
1.7.1