Bug 248256 - SElinux prevents starting Xen guests
Summary: SElinux prevents starting Xen guests
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 7
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-14 12:41 UTC by Felix Schwarz
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version: Current
Clone Of:
Environment:
Last Closed: 2007-08-22 14:10:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Felix Schwarz 2007-07-14 12:41:38 UTC
Description of problem:
On a fresh F7 system (after an additional autorelabel) SElinux prevents xen from
starting xen guests with 'xm create xenguest'.

Setroubleshoot showed these messages:
avc: denied { read, write } for comm="losetup" dev=dm-3 egid=0 euid=0
exe="/sbin/losetup" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="el4_32_build"
pid=8929 scontext=system_u:system_r:fsadm_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:fsadm_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:xen_image_t:s0 tty=(none) uid=0

avc: denied { append } for comm="losetup" dev=dm-0 egid=0 euid=0
exe="/sbin/losetup" exit=0 fsgid=0 fsuid=0 gid=0 items=0 name="xen-hotplug.log"
path="/var/log/xen/xen-hotplug.log" pid=8929
scontext=system_u:system_r:fsadm_t:s0-s0:c0.c1023 sgid=0
subj=system_u:system_r:fsadm_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:xend_var_log_t:s0 tty=(none) uid=0


audit2allow generated these rules:
module local 1.0;

require {
        type fsadm_t;
        type udev_t;
        type xen_image_t;
        type xend_var_log_t;
        class capability sys_module;
        class file { read write append };
}

#============= fsadm_t ==============
allow fsadm_t xen_image_t:file { read write };
allow fsadm_t xend_var_log_t:file append;


Using the generated rules, I can start the guest.


Version-Release number of selected component (if applicable):
$ rpm -q selinux-policy
selinux-policy-2.6.4-26.fc7
$ rpm -q selinux-policy-targeted
selinux-policy-targeted-2.6.4-26.fc7

How reproducible:
Always

Steps to Reproduce:
0. targeted SElinux in enforcing mode
1. have a Xen guest image in /var/lib/xen/images
2. xm create xenguest
 
Actual results:
Xen guest is no started.

Expected results:
Xen guest begins to boot.

Additional info:

Comment 1 Daniel Walsh 2007-07-16 20:19:45 UTC
Fixed in selinux-policy-2.6.4-28.fc7

Comment 2 Daniel Walsh 2007-08-22 14:10:31 UTC
Closing as fixes are in the current release


Note You need to log in before you can comment on or make changes to this bug.