qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] RFC: seccomp action, prefer KILL_PROCESS or TRAP
@ 2018-07-20 15:44 Marc-André Lureau
  2018-07-20 15:44 ` [Qemu-devel] [PATCH 1/2] seccomp: use SIGSYS signal instead of killing the thread Marc-André Lureau
  2018-07-20 15:44 ` [Qemu-devel] [PATCH 2/2] RFC: seccomp: prefer SCMP_ACT_KILL_PROCESS if available Marc-André Lureau
  0 siblings, 2 replies; 7+ messages in thread
From: Marc-André Lureau @ 2018-07-20 15:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: pmoore, Eduardo Otubo, Marc-André Lureau

Hi,

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.

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

Marc-André Lureau (2):
  seccomp: use SIGSYS signal instead of killing the thread
  RFC: seccomp: prefer SCMP_ACT_KILL_PROCESS if available

 qemu-seccomp.c | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

-- 
2.18.0.232.gb7bd9486b0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-25 10:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20 15:44 [Qemu-devel] [PATCH 0/2] RFC: seccomp action, prefer KILL_PROCESS or TRAP Marc-André Lureau
2018-07-20 15:44 ` [Qemu-devel] [PATCH 1/2] seccomp: use SIGSYS signal instead of killing the thread Marc-André Lureau
2018-07-20 16:00   ` Daniel P. Berrangé
2018-07-25 10:42     ` Eduardo Otubo
2018-07-20 15:44 ` [Qemu-devel] [PATCH 2/2] RFC: seccomp: prefer SCMP_ACT_KILL_PROCESS if available Marc-André Lureau
2018-07-23  9:33   ` Daniel P. Berrangé
2018-07-25 10:42   ` Eduardo Otubo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).