From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5Gb4-0003SW-RE for qemu-devel@nongnu.org; Mon, 20 Jan 2014 10:17:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5Gav-00089N-SQ for qemu-devel@nongnu.org; Mon, 20 Jan 2014 10:17:06 -0500 Received: from e24smtp01.br.ibm.com ([32.104.18.85]:59374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5Gav-000899-Fn for qemu-devel@nongnu.org; Mon, 20 Jan 2014 10:16:57 -0500 Received: from /spool/local by e24smtp01.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 20 Jan 2014 13:16:54 -0200 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by d24dlp01.br.ibm.com (Postfix) with ESMTP id E333C3520065 for ; Mon, 20 Jan 2014 10:16:50 -0500 (EST) Received: from d24av05.br.ibm.com (d24av05.br.ibm.com [9.18.232.44]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0KFGwBK5107952 for ; Mon, 20 Jan 2014 13:16:59 -0200 Received: from d24av05.br.ibm.com (localhost [127.0.0.1]) by d24av05.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0KFGpdt029186 for ; Mon, 20 Jan 2014 10:16:51 -0500 From: Eduardo Otubo Date: Mon, 20 Jan 2014 13:16:43 -0200 Message-Id: <1390231004-18392-2-git-send-email-otubo@linux.vnet.ibm.com> In-Reply-To: <1390231004-18392-1-git-send-email-otubo@linux.vnet.ibm.com> References: <1390231004-18392-1-git-send-email-otubo@linux.vnet.ibm.com> Subject: [Qemu-devel] [PULL 01/02] 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: pmoore@redhat.com, anthony@codemonkey.ws From: Paul Moore 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 Acked-by: Eduardo Otubo --- 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