|
|
0a122b |
From 45031cfb033d0c3941f48acb8c46861f756ab700 Mon Sep 17 00:00:00 2001
|
|
|
0a122b |
From: Paul Moore <pmoore@redhat.com>
|
|
|
0a122b |
Date: Mon, 27 Jan 2014 21:43:11 +0100
|
|
|
0a122b |
Subject: [PATCH 01/28] seccomp: add mkdir() and fchmod() to the whitelist
|
|
|
0a122b |
|
|
|
0a122b |
RH-Author: Paul Moore <pmoore@redhat.com>
|
|
|
0a122b |
Message-id: <20140127214311.24608.57759.stgit@localhost>
|
|
|
0a122b |
Patchwork-id: 56966
|
|
|
0a122b |
O-Subject: [RHEL7 qemu-kvm PATCH 1/2] seccomp: add mkdir() and fchmod() to the whitelist
|
|
|
0a122b |
Bugzilla: 1026314
|
|
|
0a122b |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Juan Quintela <quintela@redhat.com>
|
|
|
0a122b |
|
|
|
0a122b |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1026314
|
|
|
0a122b |
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6956172
|
|
|
0a122b |
Upstream: upstream, see commit IDs
|
|
|
0a122b |
Testing: tested, see BZ
|
|
|
0a122b |
|
|
|
0a122b |
seccomp: add mkdir() and fchmod() to the whitelist
|
|
|
0a122b |
|
|
|
0a122b |
The PulseAudio library attempts to do a mkdir(2) and fchmod(2) on
|
|
|
0a122b |
"/run/user/<UID>/pulse" which is currently blocked by the syscall
|
|
|
0a122b |
filter; this patch adds the two missing syscalls to the whitelist.
|
|
|
0a122b |
You can reproduce this problem with the following command:
|
|
|
0a122b |
|
|
|
0a122b |
# qemu -monitor stdio -device intel-hda -device hda-duplex
|
|
|
0a122b |
|
|
|
0a122b |
If watched under strace the following syscalls are shown:
|
|
|
0a122b |
|
|
|
0a122b |
mkdir("/run/user/0/pulse", 0700)
|
|
|
0a122b |
fchmod(11, 0700) [NOTE: 11 is the fd for /run/user/0/pulse]
|
|
|
0a122b |
|
|
|
0a122b |
Reported-by: xuhan@redhat.com
|
|
|
0a122b |
Signed-off-by: Paul Moore <pmoore@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
qemu-seccomp.c | 4 +++-
|
|
|
0a122b |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
qemu-seccomp.c | 4 +++-
|
|
|
0a122b |
1 files changed, 3 insertions(+), 1 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
|
|
|
0a122b |
index fc48bdd..34a54e4 100644
|
|
|
0a122b |
--- a/qemu-seccomp.c
|
|
|
0a122b |
+++ b/qemu-seccomp.c
|
|
|
0a122b |
@@ -237,7 +237,9 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
|
|
|
0a122b |
{ SCMP_SYS(io_cancel), 241 },
|
|
|
0a122b |
{ SCMP_SYS(io_setup), 241 },
|
|
|
0a122b |
{ SCMP_SYS(io_destroy), 241 },
|
|
|
0a122b |
- { SCMP_SYS(arch_prctl), 240 }
|
|
|
0a122b |
+ { SCMP_SYS(arch_prctl), 240 },
|
|
|
0a122b |
+ { SCMP_SYS(mkdir), 240 },
|
|
|
0a122b |
+ { SCMP_SYS(fchmod), 240 }
|
|
|
0a122b |
};
|
|
|
0a122b |
|
|
|
0a122b |
int seccomp_start(void)
|
|
|
0a122b |
--
|
|
|
0a122b |
1.7.1
|
|
|
0a122b |
|