]> git.ipfire.org Git - thirdparty/qemu.git/commit
seccomp: use SIGSYS signal instead of killing the thread
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 22 Aug 2018 17:02:47 +0000 (19:02 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 2 Apr 2019 18:10:37 +0000 (13:10 -0500)
commit8eba63e1d246b2a40a96519951d4079a806e1b27
tree540cfd929d7203faff06f1c48e779dc6f46189e3
parent7347a04da35ec6284ce83e8bcd72dc4177d17b10
seccomp: use SIGSYS signal instead of killing the thread

The seccomp action SCMP_ACT_KILL results in immediate termination of
the thread that made the bad system call. However, qemu being
multi-threaded, it keeps running. There is no easy way for parent
process / management layer (libvirt) to know about that situation.

Instead, the default SIGSYS handler when invoked with SCMP_ACT_TRAP
will terminate the program and core dump.

This may not be the most secure solution, but probably better than
just killing the offending thread. SCMP_ACT_KILL_PROCESS has been
added in Linux 4.14 to improve the situation, which I propose to use
by default if available in the next patch.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1594456

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Eduardo Otubo <otubo@redhat.com>
(cherry picked from commit 6f2231e9b0931e1998d9ed0c509adf7aedc02db2)
*CVE-2018-15746
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-seccomp.c