From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzAtG-0005PR-2j for qemu-devel@nongnu.org; Fri, 03 Jan 2014 14:58:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzAt6-0004FC-Pd for qemu-devel@nongnu.org; Fri, 03 Jan 2014 14:58:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzAt6-0004Ep-HK for qemu-devel@nongnu.org; Fri, 03 Jan 2014 14:58:32 -0500 From: Paul Moore Date: Fri, 03 Jan 2014 14:58:27 -0500 Message-ID: <20140103195827.7268.69658.stgit@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] seccomp: add mkdir() and fchmod() to the whitelist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: otubo@linux.vnet.ibm.com The PulseAudio library attempts to do a mkdir(2) and fchmod(2) on "/run/user//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 --- qemu-seccomp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index cf07869..bb19306 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)