public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Andrea Arcangeli <aarcange@redhat.com>,
	Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Ingo Molnar <mingo@elte.hu>, Pekka Enberg <penberg@kernel.org>,
	Cyrill Gor
Cc: kvm <kvm@vger.kernel.org>
Subject: Secure KVM
Date: Sun, 06 Nov 2011 22:40:20 +0200	[thread overview]
Message-ID: <1320612020.3299.22.camel@lappy> (raw)

Hi all,

I'm planning on doing a small fork of the KVM tool to turn it into a
'Secure KVM' enabled hypervisor. Now you probably ask yourself, Huh?

The idea was discussed briefly couple of months ago, but never got off
the ground - which is a shame IMO.

It's easy to explain the problem: If an attacker finds a security hole
in any of the devices which are exposed to the guest, the attacker would
be able to either crash the guest, or possibly run code on the host
itself.

The solution is also simple to explain: Split the devices into different
processes and use seccomp to sandbox each device into the exact set of
resources it needs to operate, nothing more and nothing less.

Since I'll be basing it on the KVM tool, which doesn't really emulate
that many legacy devices, I'll focus first on the virtio family for the
sake of simplicity (and covering 90% of the options).

This is my basic overview of how I'm planning on implementing the
initial POC:

1. First I'll focus on the simple virtio-rng device, it's simple enough
to allow us to focus on the aspects which are important for the POC
while still covering most bases (i.e. sandbox to single file
- /dev/urandom and such).

2. Do it on a one process per device concept, where for each device
(notice - not device *type*) requested, a new process which handles it
will be spawned.

3. That process will be limited exactly to the resources it needs to
operate, for example - if we run a virtio-blk device, it would be able
to access only the image file which it should be using.

4. Connection between hypervisor and devices will be based on unix
sockets, this should allow for better separation compared to other
approaches such as shared memory.

5. While performance is an aspect, complete isolation is more important.
Security is primary, performance is secondary.

6. Share as much code as possible with current implementation of virtio
devices, make it possible to run virtio devices either like it's being
done now, or by spawning them as separate processes - the amount of
specific code for the separate process case should be minimal.


Thats all I have for now, comments are *very* welcome.

-- 

Sasha.


             reply	other threads:[~2011-11-06 20:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 20:40 Sasha Levin [this message]
2011-11-07  0:07 ` Secure KVM Rusty Russell
2011-11-07  6:29   ` Sasha Levin
2011-11-07  6:37     ` Pekka Enberg
2011-11-07  6:46       ` Sasha Levin
2011-11-07  7:03         ` Pekka Enberg
2011-11-07 22:49     ` Rusty Russell
2011-11-07  9:26 ` Avi Kivity
2011-11-07 10:17   ` Sasha Levin
2011-11-07 10:27     ` Avi Kivity
2011-11-07 11:27     ` Stefan Hajnoczi
2011-11-07 12:40       ` Sasha Levin
2011-11-07 12:51         ` Avi Kivity
2011-11-07 14:56           ` Stefan Hajnoczi
2011-11-07 17:43       ` Anthony Liguori
2011-11-07 18:41         ` Avi Kivity
2011-11-07 17:39   ` Anthony Liguori
2011-11-07 18:43     ` Avi Kivity
2011-11-07 19:07       ` Anthony Liguori
2011-11-07 19:54         ` Avi Kivity
2011-11-07 22:56   ` Rusty Russell
2011-11-07 17:37 ` Anthony Liguori
2011-11-07 17:52   ` Sasha Levin
2011-11-07 18:03     ` [Qemu-devel] " Anthony Liguori
2011-11-07 23:06       ` Rusty Russell
2011-11-08 19:51       ` Will Drewry

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=1320612020.3299.22.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtosatti@redhat.com \
    --cc=penberg@kernel.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