Bug 873355 - avc: denied { read } for pid=12901 comm="xend" name="para.img" dev="dm-1" ino=1443697 scontext=system_u:system_r:xend_t:s0 tcontext=system_u:object_r:virt_image_t:s0 tclass=file
Summary: avc: denied { read } for pid=12901 comm="xend" name="para.img" dev="dm-1" ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-05 16:01 UTC by Michal Kovarik
Modified: 2012-12-07 04:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-07 04:30:09 UTC
Type: Bug


Attachments (Terms of Use)

Description Michal Kovarik 2012-11-05 16:01:13 UTC
Description of problem:
I've tried xen para virtualization on F18Beta-TC7. Installation was successful but after click on reboot, warning dialog show up:
xend_post: error from xen daemon: (xend.err "Disk isn't accessible")

in audit log:
type=AVC msg=audit(1352130837.961:1311): avc:  denied  { read } for  pid=20763 comm="xend" name="f16.img" dev="dm-1" ino=1443701 scontext=system_u:system_r:xend_t:s0 tcontext=system_u:object_r:virt_image_t:s0 tclass=file
type=SYSCALL msg=audit(1352130837.961:1311): arch=c000003e syscall=21 success=no exit=-13 a0=7f9bd40ddd70 a1=4 a2=7f9c0b908a08 a3=20 items=0 ppid=1 pid=20763 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="xend" exe=2F7573722F62696E2F707974686F6E322E37202864656C6574656429 subj=system_u:system_r:xend_t:s0 key=(null)

Version-Release number of selected component (if applicable):
selinux-policy-3.11.1-46.fc18.noarch
selinux-policy-targeted-3.11.1-46.fc18.noarch
xen-hypervisor-4.2.0-3.fc18.x86_64
xen-libs-4.2.0-3.fc18.x86_64
xen-4.2.0-3.fc18.x86_64
xen-licenses-4.2.0-3.fc18.x86_64
xen-runtime-4.2.0-3.fc18.x86_64
libvirt-daemon-driver-xen-0.10.2.1-2.fc18.x86_64


How reproducible:


Steps to Reproduce:
1. on Fedora-18-Beta-TC7 install xen virtualization
2. install e.g. fedora16 guest, reboot guest
  
Actual results:
type=AVC msg=audit(1352129887.015:1037): avc:  denied  { read } for  pid=12901 comm="xend" name="para.img" dev="dm-1" ino=1443697 scontext=system_u:system_r:xend_t:s0 tcontext=system_u:object_r:virt_image_t:s0 tclass=file


Expected results:
no AVC denial

Additional info:

Comment 1 Daniel Walsh 2012-11-05 18:46:49 UTC
If you change the label to xen_image_t this should work fine.


chcon -t xen_image_t para.img f16.img

Can you run this from libvirt?

Comment 2 Michal Kovarik 2012-11-06 11:39:25 UTC
I've changed label and it works now.
I used virt-manager for system installation.

Comment 3 Miroslav Grepl 2012-11-07 13:41:02 UTC
Ok so this xen image is located in the /var/lib/libvirt/images by default in your case, right?

Comment 4 Michal Kovarik 2012-11-07 13:57:19 UTC
yes

Comment 5 Daniel Walsh 2012-11-07 15:53:36 UTC
Maybe we should just allow xend to manager virt_image_t.

Comment 6 Miroslav Grepl 2012-11-08 09:40:40 UTC
I agree. Added to selinux-policy-3.11.1-52.fc18

Comment 7 Fedora Update System 2012-11-28 20:56:50 UTC
selinux-policy-3.11.1-57.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-57.fc18

Comment 8 Fedora Update System 2012-11-30 06:35:02 UTC
Package selinux-policy-3.11.1-57.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-57.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-57.fc18
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-12-02 19:29:06 UTC
Package selinux-policy-3.11.1-59.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-59.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-59.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-12-06 20:11:24 UTC
Package selinux-policy-3.11.1-60.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-60.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-60.fc18
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2012-12-07 04:30:11 UTC
selinux-policy-3.11.1-60.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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