public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Joanna Rutkowska <joanna@invisiblethingslab.com>,
	Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: A few KVM security questions
Date: Mon, 07 Dec 2009 13:58:57 -0600	[thread overview]
Message-ID: <4B1D5E81.8010909@codemonkey.ws> (raw)
In-Reply-To: <20091207181556.GM4679@tyrion.haifa.ibm.com>

Muli Ben-Yehuda wrote:
> On Mon, Dec 07, 2009 at 11:38:52AM -0600, Anthony Liguori wrote:
>
>   
>> I'm skeptical that VT-d in its current form provides protection
>> against a malicious guest.  The first problem is interrupt delivery.
>> I don't think any hypervisor has really put much thought into
>> mitigating interrupt storms as a DoS.  I think there are a number of
>> nasty things that can be done here.
>>     
>
> Seems to me that detecting an interrupt storm and shutting the
> offending domain and device off is fairly easy for MSI and MSI-X
> interrupts, and not-interesting for legacy INTx interrupts. I don't
> know that any hypervisor actually implements it, though.
>
>   
>> Even if you assume that there aren't flaws in VT-d wrt malicious
>> guests, we have generations of hardware that have not been designed
>> to be robust against malicious operating systems.  There are almost
>> certainly untold numbers of exploitable hardware bugs that can be
>> used to do all sorts of terrible things to the physical system.
>>     
>
> To the device? Undoubtedly. To the host? I'm not so sure.
>   

But in the context of SR-IOV, impacting the device may result in 
disrupting (and potentially exploiting) other domains.

And I'm waiting for the "malicious guest sets server on fire" CVE :-)  
I'm convinced there will be at least one.

>> VT-d protects against DMA access, but there's still plenty of things
>> a malicious PCI device can do to harm the physical system.  I'm sure
>> you could easily program a PCI device to flood the bus which
>> effectively mounts a DoS against other domains.
>>     
>
> But is there any way the device could do this and also evade detection
> of evade being taken off-line by the host, after first killing its
> controlling VM?
>   

Thing is, the bus is shared by the host too.  So if the guest is able to 
bring all IO devices on the system to a halt, an administrator certainly 
couldn't connect remotely to take corrective action.

I think all of this could potentially be detected and handled but I 
assume there's years of research here before that's a reality.

>> There is no mechanism to arbitrate this today.  It's really a
>> dramatically different model from a security perspective.
>>     
>
> I think we need to differentiate between assigning full (legacy)
> devices, and assigning an SRIOV VF. In the latter---more
> interesting---case, the host remains in control of the overall device,
> so shutting off a mis-behaving VF should be simple.
>   

SR-IOV is worse IMHO because now there are multiple guests that can be 
impacted by a hardware exploit.

Regards,

Anthony Liguori

  parent reply	other threads:[~2009-12-07 19:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 13:05 A few KVM security questions Joanna Rutkowska
2009-12-07 13:17 ` Avi Kivity
2009-12-07 13:30   ` Joanna Rutkowska
2009-12-07 13:38     ` Avi Kivity
2009-12-07 14:06       ` Joanna Rutkowska
2009-12-07 14:09         ` Avi Kivity
2009-12-07 16:44       ` Anthony Liguori
2009-12-07 17:09         ` Joanna Rutkowska
2009-12-07 17:13           ` Avi Kivity
2009-12-07 17:15             ` Joanna Rutkowska
2009-12-07 17:18               ` Avi Kivity
2009-12-07 17:33                 ` Joanna Rutkowska
2009-12-07 18:34                   ` Avi Kivity
2009-12-09 10:43                   ` Pasi Kärkkäinen
2009-12-07 17:38               ` Anthony Liguori
2009-12-07 17:45                 ` Joanna Rutkowska
     [not found]                 ` <20091207181556.GM4679@tyrion.haifa.ibm.com>
2009-12-07 19:58                   ` Anthony Liguori [this message]
2009-12-07 17:33           ` Anthony Liguori
2009-12-07 17:58             ` Joanna Rutkowska
2009-12-07 17:47           ` Daniel P. Berrange
2009-12-07 13:55   ` Joanna Rutkowska
2009-12-07 14:01     ` Avi Kivity
2009-12-07 16:47     ` Anthony Liguori

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=4B1D5E81.8010909@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=joanna@invisiblethingslab.com \
    --cc=kvm@vger.kernel.org \
    --cc=muli@il.ibm.com \
    /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