Bug 541908 - SELinux default policy does not allow qemu-kvm to access a device-mapper device
Summary: SELinux default policy does not allow qemu-kvm to access a device-mapper device
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-27 14:36 UTC by Casey Dahlin
Modified: 2014-06-18 08:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-30 22:34:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Casey Dahlin 2009-11-27 14:36:41 UTC
Customer is getting the following message trying to give a device mapper device to a guest:

SELinux is preventing qemu-kvm (qemu_t) "getattr" to /dev/mapper/guest01
(fixed_disk_device_t).

Detailed Description:

SELinux denied access requested by qemu-kvm. It is not expected that this access
is required by qemu-kvm and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

host=bl465cg1-0.med.usyd.edu.au type=AVC msg=audit(1259208388.162:36): avc:  denied  { getattr } for  pid=6074 comm="qemu-kvm" path="/dev/mapper/guest01" dev=tmpfs ino=17180 scontext=system_u:system_r:qemu_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file

host=bl465cg1-0.med.usyd.edu.au type=SYSCALL msg=audit(1259208388.162:36): arch=c000003e syscall=4 success=no exit=-13 a0=1c5fe020 a1=7fff2a2d36c0 a2=7fff2a2d36c0 a3=0 items=0 ppid=1 pid=6074 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="qemu-kvm" exe="/usr/libexec/qemu-kvm" subj=system_u:system_r:qemu_t:s0-s0:c0.c1023 key=(null)


Version-Release number of selected component (if applicable):
kvm-83-105.el5_4.9

Comment 1 Daniel Walsh 2009-11-30 22:34:00 UTC
You must label this device as virt_image_t

# semanage fcontext -a -t virt_image_t /dev/mapper/guest01
# restorecon -R -v /dev/mapper/guest01


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