qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Cc: Paul Moore <pmoore@redhat.com>, Eduardo Otubo <otubo@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3 3/3] seccomp: set the seccomp filter to all threads
Date: Wed, 22 Aug 2018 11:07:24 -0500	[thread overview]
Message-ID: <4a0122ad-52eb-d241-709b-76038e65a858@redhat.com> (raw)
In-Reply-To: <CAMxuvawr-ooy91ZHTHx+aLYhgpH5gBoAKQz_pvF=kcHzadjLog@mail.gmail.com>

On 08/22/2018 10:58 AM, Marc-André Lureau wrote:

>> At this point you might as well not bother using seccomp at all. The
>> thread that is confined merely needs to scribble something into the
>> stack of the unconfined thread and now it can do whatever it wants.
> 
> Actually, that message is incorrect, it should rather be "not all
> threads will be filtered" (as described in commit message).
> 
>> IMHO we need to find a way to get the policy to apply to those other
>> threads.
> 
> That's what the patch is about ;)

In other words, this patch is patching the gaping security hole that 
already exists, but...

>>> +++ b/qemu-options.hx
>>> @@ -3864,6 +3864,8 @@ Disable set*uid|gid system calls
>>>   Disable *fork and execve
>>>   @item resourcecontrol=@var{string}
>>>   Disable process affinity and schedular priority
>>> +@item tsync=@var{bool}
>>> +Apply seccomp filter to all threads (default is auto, and will warn if fail)
>>
>> IMHO this should never exist, as setting "tsync" to anything other
>> than "yes", is akin to just running without any sandbox.
> 
> Then we should just fail -sandbox on those systems.

...leaving the backdoor open.  Yes, we should instead fix things to hard 
fail when -sandbox cannot fully protect the process, rather than adding 
a tsync=off backdoor to permit execution in spite of the insecurity.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  parent reply	other threads:[~2018-08-22 16:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 14:29 [Qemu-devel] [PATCH v3 0/3] seccomp fixes Marc-André Lureau
2018-08-22 14:29 ` [Qemu-devel] [PATCH v3 1/3] seccomp: use SIGSYS signal instead of killing the thread Marc-André Lureau
2018-08-22 14:29 ` [Qemu-devel] [PATCH v3 2/3] seccomp: prefer SCMP_ACT_KILL_PROCESS if available Marc-André Lureau
2018-08-22 14:29 ` [Qemu-devel] [PATCH v3 3/3] seccomp: set the seccomp filter to all threads Marc-André Lureau
2018-08-22 15:46   ` Daniel P. Berrangé
2018-08-22 15:58     ` Marc-André Lureau
2018-08-22 16:06       ` Daniel P. Berrangé
2018-08-22 16:37         ` Marc-André Lureau
2018-08-22 16:39           ` Marc-André Lureau
2018-08-22 16:46             ` Daniel P. Berrangé
2018-08-22 16:51           ` Daniel P. Berrangé
2018-08-22 16:07       ` Eric Blake [this message]
2018-08-22 16:19         ` Marc-André Lureau
2018-08-22 16:43           ` Daniel P. Berrangé
2018-08-22 16:53             ` Daniel P. Berrangé
2018-08-22 15:30 ` [Qemu-devel] [PATCH v3 0/3] seccomp fixes Eduardo Otubo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a0122ad-52eb-d241-709b-76038e65a858@redhat.com \
    --to=eblake@redhat.com \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=otubo@redhat.com \
    --cc=pmoore@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).