yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-seccomp-add-kill-to-the-syscall-whitelist.patch

0a122b
From 2735c1f0c0ae68933112a98bf5a5c6d22486c74f Mon Sep 17 00:00:00 2001
0a122b
Message-Id: <2735c1f0c0ae68933112a98bf5a5c6d22486c74f.1387369730.git.minovotn@redhat.com>
0a122b
In-Reply-To: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
0a122b
References: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
0a122b
From: Paul Moore <pmoore@redhat.com>
0a122b
Date: Tue, 3 Dec 2013 16:04:48 +0100
0a122b
Subject: [PATCH 03/21] seccomp: add kill() to the syscall whitelist
0a122b
0a122b
RH-Author: Paul Moore <pmoore@redhat.com>
0a122b
Message-id: <20131203160448.1445.78917.stgit@localhost>
0a122b
Patchwork-id: 55976
0a122b
O-Subject: [RHEL7 qemu-kvm PATCH] seccomp: add kill() to the syscall whitelist
0a122b
Bugzilla: 1026314
0a122b
RH-Acked-by: Bandan Das <bsd@redhat.com>
0a122b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
0a122b
RH-Acked-by: knoel@redhat.com
0a122b
0a122b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1026314
0a122b
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6672333
0a122b
Upstream: In QEMU/seccomp maintainer's tree
0a122b
          git://github.com/otubo/qemu.git#seccomp
0a122b
Tested: Tested by myself, IBM, and original BZ reporter, see BZ
0a122b
0a122b
	commit: e9eecb5bf82a71564bf018fcbbfc6cda19cab6c2
0a122b
	From: Paul Moore <pmoore@redhat.com>
0a122b
	Date: 2013-11-20 11:12:17 -0500
0a122b
0a122b
	seccomp: add kill() to the syscall whitelist
0a122b
0a122b
	The kill() syscall is triggered with the following command:
0a122b
0a122b
	# qemu -sandbox on -monitor stdio \
0a122b
		-device intel-hda -device hda-duplex -vnc :0
0a122b
0a122b
	The resulting syslog/audit message:
0a122b
0a122b
	# ausearch -m SECCOMP
0a122b
	----
0a122b
	time->Wed Nov 20 09:52:08 2013
0a122b
	type=SECCOMP msg=audit(1384912328.482:6656): auid=0 uid=0 gid=0 ses=854
0a122b
	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=12087
0a122b
	comm="qemu-kvm" sig=31 syscall=62 compat=0 ip=0x7f7a1d2abc67 code=0x0
0a122b
	# scmp_sys_resolver 62
0a122b
	kill
0a122b
0a122b
	Reported-by: CongLi <coli@redhat.com>
0a122b
	Tested-by: CongLi <coli@redhat.com>
0a122b
	Signed-off-by: Paul Moore <pmoore@redhat.com>
0a122b
	Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
0a122b
---
0a122b
 qemu-seccomp.c |    1 +
0a122b
 1 file changed, 1 insertion(+)
0a122b
0a122b
Signed-off-by: Michal Novotny <minovotn@redhat.com>
0a122b
---
0a122b
 qemu-seccomp.c | 1 +
0a122b
 1 file changed, 1 insertion(+)
0a122b
0a122b
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
0a122b
index ca15f21..906101f 100644
0a122b
--- a/qemu-seccomp.c
0a122b
+++ b/qemu-seccomp.c
0a122b
@@ -123,6 +123,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
0a122b
     { SCMP_SYS(write), 244 },
0a122b
     { SCMP_SYS(fcntl), 243 },
0a122b
     { SCMP_SYS(tgkill), 242 },
0a122b
+    { SCMP_SYS(kill), 242 },
0a122b
     { SCMP_SYS(rt_sigaction), 242 },
0a122b
     { SCMP_SYS(pipe2), 242 },
0a122b
     { SCMP_SYS(munmap), 242 },
0a122b
-- 
0a122b
1.7.11.7
0a122b