
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://selinuxproject.org/w/skins/common/feed.css?63"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Svirt requirements v1.0 - Revision history</title>
		<link>http://selinuxproject.org/w/?title=Svirt_requirements_v1.0&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.10.4</generator>
		<lastBuildDate>Thu, 23 May 2013 17:36:58 GMT</lastBuildDate>
		<item>
			<title>JamesMorris: New page: &lt;pre&gt;                                                              11 Aug 2008      sVirt: Integration of SELinux and Linux-based Virtualization                    Requirements and Design ...</title>
			<link>http://selinuxproject.org/w/?title=Svirt_requirements_v1.0&amp;diff=267&amp;oldid=prev</link>
			<description>&lt;p&gt;New page: &amp;lt;pre&amp;gt;                                                              11 Aug 2008      sVirt: Integration of SELinux and Linux-based Virtualization                    Requirements and Design ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                                                            11 Aug 2008&lt;br /&gt;
&lt;br /&gt;
    sVirt: Integration of SELinux and Linux-based Virtualization&lt;br /&gt;
       &lt;br /&gt;
           Requirements and Design Considerations v1.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.  Introduction&lt;br /&gt;
&lt;br /&gt;
    This document establishes a set of functional and technical&lt;br /&gt;
    requirements for integrating SELinux with Linux-based&lt;br /&gt;
    virtualization (i.e. Linux-as-hypervisor schemes such as KVM/Qemu&lt;br /&gt;
    amd lguest).&lt;br /&gt;
    &lt;br /&gt;
    Note that non-Linux hypervisor models such as Xen are not covered&lt;br /&gt;
    explicitly in this document, although may be afforded some MAC&lt;br /&gt;
    coverage due to shared infrastructure (e.g. libvirt).  Non-Linux&lt;br /&gt;
    hypervisor models may considered further at a later stage.&lt;br /&gt;
    &lt;br /&gt;
    Also, while this document focuses on SELinux as the MAC scheme,&lt;br /&gt;
    consideration should be given to ensuring support for other&lt;br /&gt;
    label-based MAC schemes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.1  Rationale&lt;br /&gt;
&lt;br /&gt;
    With increased use of virtualization, one security benefit of&lt;br /&gt;
    physically separated systems -- strong isolation -- is reduced, an&lt;br /&gt;
    issue which may be ameliorated with the application of Mandatory&lt;br /&gt;
    Access Control (MAC) security in the host system.&lt;br /&gt;
    &lt;br /&gt;
    Integration of MAC with virtualization will also help increase the&lt;br /&gt;
    overall robustness and security assurance of both host and guest&lt;br /&gt;
    systems.  Many threats arising from flaws in the VM environment, or&lt;br /&gt;
    misconfiguration, may be mitigated through tighter isolation and&lt;br /&gt;
    specific MAC policy enforcement.&lt;br /&gt;
    &lt;br /&gt;
    By incorporating MAC support into the virtualization toolchain and&lt;br /&gt;
    documentation, users will also be able to make more use of the MAC&lt;br /&gt;
    security capabilities provided by the OS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.2  Use-cases&lt;br /&gt;
&lt;br /&gt;
    The following use-cases have been identified:&lt;br /&gt;
    &lt;br /&gt;
      o Providing virtualized services with a level of isolation&lt;br /&gt;
        similar to that previously afforded by physical separation.&lt;br /&gt;
        &lt;br /&gt;
      o Increased protection of the host from untrusted VM guests (e.g.&lt;br /&gt;
        for VM hosting providers, grid/cloud servers etc.).&lt;br /&gt;
        &lt;br /&gt;
      o Increased protection of VM guests from each other in the event&lt;br /&gt;
        of host flaws or misconfiguration.  Some protection may also be&lt;br /&gt;
        provided against a compromised host.&lt;br /&gt;
        &lt;br /&gt;
      o Consolidating access to multiple networks which require strong&lt;br /&gt;
        isolation from each other (e.g. military, government, corporate&lt;br /&gt;
        extranets, internal &amp;quot;Chinese wall&amp;quot; separation etc.)&lt;br /&gt;
        &lt;br /&gt;
      o Strongly isolating desktop applications by running them in&lt;br /&gt;
        separately labeled VMs (e.g. online banking in one VM and World&lt;br /&gt;
        of Warcraft in another; opening untrusted office documents in&lt;br /&gt;
        an isolated VM for view/print only).&lt;br /&gt;
        &lt;br /&gt;
      o Forensic analysis of disk images, binaries, browser scripts&lt;br /&gt;
        etc. in a highly isolated VM, protecting both the host system&lt;br /&gt;
        and the integrity of the components under analysis.&lt;br /&gt;
        &lt;br /&gt;
      o Isolated test environments, preventing e.g. simulated trades&lt;br /&gt;
        from entering a production system, leakage of sensitive&lt;br /&gt;
        customer data to internal networks etc.&lt;br /&gt;
        &lt;br /&gt;
      o General ability to specify a wide range of high-level security&lt;br /&gt;
        goals for virtualization through flexible MAC policy.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
2. Current Situation&lt;br /&gt;
&lt;br /&gt;
    SELinux is already able to provide general MAC protection to&lt;br /&gt;
    Linux-based virtualization, such as protecting the integrity and&lt;br /&gt;
    confidentiality of disk images and providing strong isolation of&lt;br /&gt;
    Linux hypervisor processes from the rest of the system.&lt;br /&gt;
    &lt;br /&gt;
    There is, however, no explicit support for Linux-based&lt;br /&gt;
    virtualization in SELinux, and all VMs currently run in the same&lt;br /&gt;
    security context.  Thus, there is no MAC isolation applied between&lt;br /&gt;
    VMs.&lt;br /&gt;
    &lt;br /&gt;
3. Functional Security Requirements&lt;br /&gt;
&lt;br /&gt;
    3.1  Strong isolation between active VMs&lt;br /&gt;
    &lt;br /&gt;
    Running different VMs with different MAC labels allows stronger&lt;br /&gt;
    isolation between VMs, reducing risks arising from flaws in or&lt;br /&gt;
    misconfiguration of the VM environment.  For example, the threat of&lt;br /&gt;
    a rogue VM exploiting a flaw in KVM could be greatly reduced if it&lt;br /&gt;
    is isolated from other VMs by MAC security policy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    3.2  Improved control over access to VM resources&lt;br /&gt;
    &lt;br /&gt;
    Distinct MAC labeling of resources belonging to VMs (disk images,&lt;br /&gt;
    disk partitions etc.) binds VM instances to those resources,&lt;br /&gt;
    ensuring that VMs can only access their own resources.  This can&lt;br /&gt;
    protect the VM from invalid VM resources; and protect VM resources&lt;br /&gt;
    from flawed or misconfigured VMs.&lt;br /&gt;
      &lt;br /&gt;
&lt;br /&gt;
    3.3  Improved control over access to shared resources&lt;br /&gt;
    &lt;br /&gt;
    Where VMs may share resources (e.g. miscellaneous devices, virtual&lt;br /&gt;
    networking, read-only disk images etc.), fine-grained MAC policy&lt;br /&gt;
    may be specified to control information flow between VMs.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    3.4  Fine-grained interaction with the host&lt;br /&gt;
&lt;br /&gt;
    With distinct labeling of VMs and their resources, interactions&lt;br /&gt;
    with host entities on a per-VM basis may then be controlled by MAC&lt;br /&gt;
    policy.&lt;br /&gt;
    &lt;br /&gt;
    An example of this would be to safely allow different users on the&lt;br /&gt;
    host to administer different VMs.  Configuration of this could be&lt;br /&gt;
    managed via the RBAC scheme integrated with SELinux.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    3.5  Coarse MAC containment of VMs&lt;br /&gt;
  &lt;br /&gt;
    High-level security constraints may be applied to different VMs, to&lt;br /&gt;
    allow simplified lock-down of the overall system.  For example, a&lt;br /&gt;
    VM may be restricted so that it cannot transmit TCP traffic on port&lt;br /&gt;
    25 via virtual networking (i.e. the guest cannot be used as a spam&lt;br /&gt;
    bot even if it is compromised via a rootkit).&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    3.6  Leverage general MAC architecture&lt;br /&gt;
  &lt;br /&gt;
    As MAC is extended to the desktop, it will be possible to apply&lt;br /&gt;
    uniform MAC policy to the OS, desktop and Linux-based&lt;br /&gt;
    virtualization components.  This will provide a basis for a variety&lt;br /&gt;
    of sophisticated security applications such as a virtualized MLS&lt;br /&gt;
    desktop with different windows running VMs at different security&lt;br /&gt;
    levels.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
4.  Design Considerations&lt;br /&gt;
&lt;br /&gt;
    4.1  Consensus in preliminary discussion appears to be that adding&lt;br /&gt;
         MAC to libvirt will be the most effective approach.  Support&lt;br /&gt;
         may then be extended to virsh, virt-manager, oVirt etc.&lt;br /&gt;
       &lt;br /&gt;
    4.2  Initially, sVirt should &amp;quot;just work&amp;quot; as a means to isolate VMs,&lt;br /&gt;
         with minimal administrative interaction.  e.g. an option is&lt;br /&gt;
         added to virt-manager which allows a VM to be designated as&lt;br /&gt;
         &amp;quot;isolated&amp;quot;, and from then on, it is automatically run in a&lt;br /&gt;
         separate security context, with policy etc. being generated&lt;br /&gt;
         and managed by libvirt.&lt;br /&gt;
       &lt;br /&gt;
    4.3  We need to consider very carefully exactly how VMs will be&lt;br /&gt;
         launched and controlled e.g. overall security ultimately must&lt;br /&gt;
         be enforced by the host kernel, even though VM launch will be&lt;br /&gt;
         initially controlled by host userspace.&lt;br /&gt;
&lt;br /&gt;
    4.4  We need to consider overall management of labeling both&lt;br /&gt;
         locally and in distributed environments (e.g. oVirt), as well&lt;br /&gt;
         as situations where VMs may be migrated between systems,&lt;br /&gt;
         backed up etc.&lt;br /&gt;
         &lt;br /&gt;
         One possible approach may be to represent the security label&lt;br /&gt;
         as the UUID of the guest and then translate that to locally&lt;br /&gt;
         meaningful values as needed.&lt;br /&gt;
       &lt;br /&gt;
    4.5  MAC controls/policy will need to be considered for any control&lt;br /&gt;
         planes (e.g. /dev/kvm).&lt;br /&gt;
  &lt;br /&gt;
    4.6  We need to ensure that we have high-level management tools&lt;br /&gt;
         available from the start, avoiding past mistakes with SELinux&lt;br /&gt;
         where we dropped a bunch of complicated pieces in the user's&lt;br /&gt;
         lap.  All aspects of sVirt must be managed by the via the virt&lt;br /&gt;
         tools and only present high-level abstractions to the user&lt;br /&gt;
         (and then, only if essential).&lt;br /&gt;
&lt;br /&gt;
    4.7  As sVirt involves creating and managing arbitrary numbers of&lt;br /&gt;
         security labels, we will need to address the effects of label&lt;br /&gt;
         space explosion and resulting complexity.&lt;br /&gt;
       &lt;br /&gt;
         Possible approaches already discussed include:&lt;br /&gt;
         &lt;br /&gt;
           - SELinux RBAC or IBAC mechanisms.&lt;br /&gt;
           &lt;br /&gt;
           - MCS labels.  This has the possible advantage of not&lt;br /&gt;
             requiring any policy changes for simple isolation: just&lt;br /&gt;
             have a general policy which applies to all MCS labels, and&lt;br /&gt;
             possibly customize behavior via the type.&lt;br /&gt;
           &lt;br /&gt;
             e.g.&lt;br /&gt;
          &lt;br /&gt;
             system_u:object_r:virt_image_t:c1&lt;br /&gt;
                               ^            ^&lt;br /&gt;
                               type         mcs label&lt;br /&gt;
                            &lt;br /&gt;
&lt;br /&gt;
          &lt;br /&gt;
             'c0' = isolated inactive VM image/device.&lt;br /&gt;
             &lt;br /&gt;
             'cN' = dynamically assigned MCS label for active VM, bound&lt;br /&gt;
                    to the UUID, and translated via MCS translation&lt;br /&gt;
                    file.  i.e. a user running ls -Z or ps -Z will see&lt;br /&gt;
                    the UUID instead of cN.&lt;br /&gt;
          &lt;br /&gt;
           &lt;br /&gt;
             'virt_image_t' = standard VM which is also isolated if an&lt;br /&gt;
                              MCS label is present.&lt;br /&gt;
                            &lt;br /&gt;
             'virt_image_nonet_t' = VM with no network access at all.&lt;br /&gt;
           &lt;br /&gt;
              etc.&lt;br /&gt;
            &lt;br /&gt;
              So, MCS is used to enforce VM isolation, Type is used to&lt;br /&gt;
              enforce general security behavior.  We can then provide a&lt;br /&gt;
              high-level GUI interface for selecting this behavior&lt;br /&gt;
              without the admin knowing anything about SELinux.&lt;br /&gt;
              &lt;br /&gt;
              Note: proof of concept testing has been performed using&lt;br /&gt;
              MCS labels, which appears to be workable at this stage.&lt;br /&gt;
&lt;br /&gt;
           - Utilize the new hierarchical types being proposed upstream by&lt;br /&gt;
             NEC.  (No analysis done yet).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    4.8  Accessing images via shared storage will present challenges as&lt;br /&gt;
         we do not yet have labeling for networked filesystems.&lt;br /&gt;
         &lt;br /&gt;
    4.9  We must ensure that any MAC support integrated into libvirt is&lt;br /&gt;
         readily debuggable.  e.g. hook into auditsp to actively&lt;br /&gt;
         process policy violations and handle them via the virt&lt;br /&gt;
         toolchain; also develop good setroubleshoot plugins.&lt;br /&gt;
&lt;br /&gt;
    4.10 {lib}semanage needs performance optimization work to reduce&lt;br /&gt;
         impact on the virt toolchain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</description>
			<pubDate>Mon, 11 Aug 2008 02:20:15 GMT</pubDate>			<dc:creator>JamesMorris</dc:creator>			<comments>http://selinuxproject.org/page/Talk:Svirt_requirements_v1.0</comments>		</item>
	</channel>
</rss>