qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC] Device sandboxing
@ 2011-12-07 18:25 Corey Bryant
  2011-12-07 18:48 ` Anthony Liguori
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Corey Bryant @ 2011-12-07 18:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Liguori, Stefan Hajnoczi, Michael Halcrow,
	Radim Krčmář, Corey C Bryant, Lee Terrell,
	Eric Paris, Paul Moore, Eduardo Terrell Ferrari Otubo, Avi Kivity,
	Richa Marwaha, Amit Shah, Ashley D Lai, George Wilson

A group of us are starting to work on sandboxing QEMU device emulation
code.  We're just getting started investigating various approaches, and
want to engage the community to gather input.

Following are the design points that we are currently considering:

* Decompose QEMU into multiple processes:

     * This could be done such that QEMU devices execute in separate
       processes based on device type, e.g. all block devices in one
       process and all network devices in a second process.  Another
       alternative is executing a separate process per device.

     * Decomposition would not only afford a level of security inherent
       in process separation, it would also allow development of stricter
       sVirt/SELinux policy for the decomposed QEMU processes (e.g. a
       block device specific policy).  This would enable a true sandbox
       with layers of defense.

* Decompose the device emulation process further into an untrusted and
   trusted thread:

     * The untrusted thread would be restricted by seccomp mode 1 and
       would contain the device emulation code.

     * The trusted helper thread would run beside the untrusted thread,
       enabling the untrusted thread to make syscalls beyond read(),
       write(), exit(), and sigreturn().

* IPC communication mechanisms:

     * An IPC mechanism will be required to enable communication between
       untrusted and trusted threads.

     * An IPC mechanism will also be required to enable communication
       between the main QEMU process and device processes.

     * The communication mechanisms must provide secure communication,
       be low overhead (easy to generate, parse, and validate), and must
       play well with sVirt/LSMs.

     * Some thoughts for IPC mechanisms are Unix sockets, pipes, virtio,
       Google Native Client's IMC, and shared memory.

* If seccomp mode 2 support becomes available, decomposition of device
   emulation into untrusted/trusted threads may not be necessary.  This
   could result in improved performance (no IPC overhead between trusted
   and untrusted thread) and reduced complexity (no need for trusted
   helper thread).

* Execution of QEMU with the sandboxed device support should be an
   optional run-time specification.

* We will be focusing on legacy devices first, both for performance and
   risk reasons.

Once we settle on a direction, we will develop a proof of concept to
share with the community.

We appreciate your input.

Regards,

Ashley Lai
Corey Bryant
Eduardo Otubo
Michael Halcrow
Paul Moore
Richa Marwaha

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

end of thread, other threads:[~2011-12-15 16:05 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 18:25 [Qemu-devel] [RFC] Device sandboxing Corey Bryant
2011-12-07 18:48 ` Anthony Liguori
2011-12-07 19:32   ` Corey Bryant
2011-12-07 19:43     ` Anthony Liguori
2011-12-07 19:52       ` Michael Halcrow
2011-12-07 20:02       ` Corey Bryant
2011-12-07 20:54       ` Eric Paris
2011-12-08  9:40         ` Stefan Hajnoczi
2011-12-11 10:50           ` Dor Laor
2011-12-12 18:54             ` Will Drewry
2011-12-08  9:47     ` Stefan Hajnoczi
2011-12-08 14:39       ` Corey Bryant
2011-12-07 21:20   ` Paul Moore
2011-12-14 17:15     ` Serge E. Hallyn
2011-12-14 23:56       ` Paul Moore
2011-12-15 14:28         ` Corey Bryant
2011-12-15 15:14           ` Serge Hallyn
2011-12-15 15:35             ` Paul Moore
2011-12-15 16:05               ` Serge Hallyn
2011-12-08 21:51 ` Blue Swirl
2011-12-12 18:30   ` Corey Bryant
2011-12-09 16:17 ` Paul Brook
2011-12-09 16:34   ` Paul Moore
2011-12-09 17:32     ` Paul Brook
2011-12-09 17:49       ` Paul Moore
2011-12-09 18:46         ` Paul Brook
2011-12-09 18:50           ` Paul Moore
2011-12-09 18:59           ` Paul Brook
2011-12-09 19:17             ` Paul Moore
2011-12-10 19:39   ` Blue Swirl
2011-12-11  9:08   ` Avi Kivity

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).