thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
Blob Blame History Raw
From 2735c1f0c0ae68933112a98bf5a5c6d22486c74f Mon Sep 17 00:00:00 2001
Message-Id: <2735c1f0c0ae68933112a98bf5a5c6d22486c74f.1387369730.git.minovotn@redhat.com>
In-Reply-To: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
References: <091eecc4fa42754760dfff393dabcc2b444e9693.1387369730.git.minovotn@redhat.com>
From: Paul Moore <pmoore@redhat.com>
Date: Tue, 3 Dec 2013 16:04:48 +0100
Subject: [PATCH 03/21] seccomp: add kill() to the syscall whitelist

RH-Author: Paul Moore <pmoore@redhat.com>
Message-id: <20131203160448.1445.78917.stgit@localhost>
Patchwork-id: 55976
O-Subject: [RHEL7 qemu-kvm PATCH] seccomp: add kill() to the syscall whitelist
Bugzilla: 1026314
RH-Acked-by: Bandan Das <bsd@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: knoel@redhat.com

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1026314
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6672333
Upstream: In QEMU/seccomp maintainer's tree
          git://github.com/otubo/qemu.git#seccomp
Tested: Tested by myself, IBM, and original BZ reporter, see BZ

	commit: e9eecb5bf82a71564bf018fcbbfc6cda19cab6c2
	From: Paul Moore <pmoore@redhat.com>
	Date: 2013-11-20 11:12:17 -0500

	seccomp: add kill() to the syscall whitelist

	The kill() syscall is triggered with the following command:

	# qemu -sandbox on -monitor stdio \
		-device intel-hda -device hda-duplex -vnc :0

	The resulting syslog/audit message:

	# ausearch -m SECCOMP
	----
	time->Wed Nov 20 09:52:08 2013
	type=SECCOMP msg=audit(1384912328.482:6656): auid=0 uid=0 gid=0 ses=854
	subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=12087
	comm="qemu-kvm" sig=31 syscall=62 compat=0 ip=0x7f7a1d2abc67 code=0x0
	# scmp_sys_resolver 62
	kill

	Reported-by: CongLi <coli@redhat.com>
	Tested-by: CongLi <coli@redhat.com>
	Signed-off-by: Paul Moore <pmoore@redhat.com>
	Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
---
 qemu-seccomp.c |    1 +
 1 file changed, 1 insertion(+)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 qemu-seccomp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index ca15f21..906101f 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -123,6 +123,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
     { SCMP_SYS(write), 244 },
     { SCMP_SYS(fcntl), 243 },
     { SCMP_SYS(tgkill), 242 },
+    { SCMP_SYS(kill), 242 },
     { SCMP_SYS(rt_sigaction), 242 },
     { SCMP_SYS(pipe2), 242 },
     { SCMP_SYS(munmap), 242 },
-- 
1.7.11.7