All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: James Morris <jmorris@namei.org>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	libvir-list@redhat.com, selinux@tycho.nsa.gov
Subject: Re: [libvirt] [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-based virtualization
Date: Tue, 12 Aug 2008 09:20:41 -0400	[thread overview]
Message-ID: <48A18E29.6050600@redhat.com> (raw)
In-Reply-To: <alpine.LRH.1.10.0808122115240.14171@tundra.namei.org>

James Morris wrote:
> On Tue, 12 Aug 2008, Daniel P. Berrange wrote:
> 
>>         Do we instead add the info the udev rules, so when /dev is
>>         populated at boot time by udev the device nodes get the desired
>>         initial labelling ?  Or do we manually  chcon() the device
>>         at the time we boot the VM ?
> 
> Dan Walsh has mentioned wanting to label the device at VM launch so that 
> MCS labels can be dynamically assigned.  This raises some other possible 
> issues such as revoking any existing access (Linux doesn't have general 
> revocation) and having the security of the system depend on whatever is 
> performing the relabel (although we can enforce relabelfrom/relabelto 
> permissions).
> 
> I wonder if existing work/concepts related to MLS device allocation would 
> be useful here.
> 
> See:
> http://sourceforge.net/projects/devallocator/
> 
> 
> - James
The experimenting I have done has been around labeling of the virt_image
and the process with mcs labels to prevent one process from touching
another process/image with a different MCS label.

system_u:system_r:qemu_t:s0:c1 can read/write
system_u:system_r:virt_image_t:s0:c1

But can not read/write system_u:system_r:virt_image_t:s0:c2
or communicate with process system_u:system_r:qemu_t:s0:c2

The idea would be to have libvirt look at the labeling of the image file
and lauch the qemu process with the correct type and  matching MCS label.

So a more advanced image might be labeled
system_u:system_r:virt_image_nonet_t:s0:c1
and libvirt would launch system_u:system_r:qemu_nonet_t:s0:c2

I have not looked into which devices on the host machine might need
higher levels of protection.

In Fedora 9/Rawhide libvirt runs as virtd_t and has a transition rule on
qemu_exec_t to qemu_t.  So all virtual machines run with
system_u:system_r:qemu_t:s0


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2008-08-12 13:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11  2:17 [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-based virtualization James Morris
2008-08-11  4:41 ` Casey Schaufler
2008-08-11  9:31   ` James Morris
2008-08-12  4:15     ` Casey Schaufler
2008-08-12  5:57     ` Russell Coker
2008-08-12  9:57       ` James Morris
2008-08-13 16:21         ` Paul Moore
     [not found] ` <20080812110803.GI13067@redhat.com>
2008-08-12 11:25   ` [libvirt] " James Morris
2008-08-12 13:20     ` Daniel J Walsh [this message]
     [not found]       ` <20080812132513.GN13067@redhat.com>
2008-08-12 13:54         ` Daniel J Walsh
     [not found]           ` <20080812140620.GO13067@redhat.com>
2008-08-12 14:16             ` Daniel J Walsh
2008-08-15  8:02 ` [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-basedvirtualization Atsushi SAKAI
2008-08-15  9:07   ` James Morris

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=48A18E29.6050600@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jmorris@namei.org \
    --cc=libvir-list@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.