render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone

Blame 0102-seccomp-add-kill-to-the-syscall-whitelist.patch

c40251
From cebb1cd8d123360634243ac527c136721fb7fba7 Mon Sep 17 00:00:00 2001
c40251
From: Paul Moore <pmoore@redhat.com>
c40251
Date: Thu, 21 Nov 2013 10:40:15 -0500
c40251
Subject: [PATCH] seccomp: add kill() to the syscall whitelist
c40251
c40251
The kill() syscall is triggered with the following command:
c40251
c40251
 # qemu -sandbox on -monitor stdio \
c40251
        -device intel-hda -device hda-duplex -vnc :0
c40251
c40251
The resulting syslog/audit message:
c40251
c40251
 # ausearch -m SECCOMP
c40251
 ----
c40251
 time->Wed Nov 20 09:52:08 2013
c40251
 type=SECCOMP msg=audit(1384912328.482:6656): auid=0 uid=0 gid=0 ses=854
c40251
  subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=12087
c40251
  comm="qemu-kvm" sig=31 syscall=62 compat=0 ip=0x7f7a1d2abc67 code=0x0
c40251
 # scmp_sys_resolver 62
c40251
 kill
c40251
c40251
Reported-by: CongLi <coli@redhat.com>
c40251
Tested-by: CongLi <coli@redhat.com>
c40251
Signed-off-by: Paul Moore <pmoore@redhat.com>
c40251
Acked-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
c40251
(cherry picked from commit e9eecb5bf82a71564bf018fcbbfc6cda19cab6c2)
c40251
---
c40251
 qemu-seccomp.c | 1 +
c40251
 1 file changed, 1 insertion(+)
c40251
c40251
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
c40251
index 69cee44..cf07869 100644
c40251
--- a/qemu-seccomp.c
c40251
+++ b/qemu-seccomp.c
c40251
@@ -114,6 +114,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
c40251
     { SCMP_SYS(write), 244 },
c40251
     { SCMP_SYS(fcntl), 243 },
c40251
     { SCMP_SYS(tgkill), 242 },
c40251
+    { SCMP_SYS(kill), 242 },
c40251
     { SCMP_SYS(rt_sigaction), 242 },
c40251
     { SCMP_SYS(pipe2), 242 },
c40251
     { SCMP_SYS(munmap), 242 },