Bug 541908 - SELinux default policy does not allow qemu-kvm to access a device-mapper device
SELinux default policy does not allow qemu-kvm to access a device-mapper device
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Walsh
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-27 09:36 EST by Casey Dahlin
Modified: 2014-06-18 04:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-30 17:34:00 EST
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 Casey Dahlin 2009-11-27 09:36:41 EST
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 17:34:00 EST
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.