Bug 248256 - SElinux prevents starting Xen guests
SElinux prevents starting Xen guests
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
7
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-14 08:41 EDT by Felix Schwarz
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: Current
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-22 10:10:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Felix Schwarz 2007-07-14 08:41:38 EDT
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 16:19:45 EDT
Fixed in selinux-policy-2.6.4-28.fc7
Comment 2 Daniel Walsh 2007-08-22 10:10:31 EDT
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.