Bug 541867

Summary: SELinux is preventing /usr/bin/qemu-kvm "read" access on images.
Product: [Fedora] Fedora Reporter: Luca Botti <luca.botti>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, luca.botti, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:958e1dc488c495c38aa8d0a92e194b011392fdff4d07f1d8a2d295c14c22d1da
Fixed In Version: selinux-policy-3.6.32-120.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-07 22:47:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luca Botti 2009-11-27 10:50:39 UTC
Summary:

SELinux is preventing /usr/bin/qemu-kvm "read" access on images.

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.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:svirt_t:s0:c739,c816
Target Context                unconfined_u:object_r:virt_var_lib_t:s0
Target Objects                images [ lnk_file ]
Source                        qemu-kvm
Source Path                   /usr/bin/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-0.11.0-11.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-46.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.5-127.fc12.x86_64 #1 SMP Sat
                              Nov 7 21:11:14 EST 2009 x86_64 x86_64
Alert Count                   2
First Seen                    Fri 27 Nov 2009 11:38:28 AM CET
Last Seen                     Fri 27 Nov 2009 11:38:28 AM CET
Local ID                      c6452be9-ed1e-4011-9297-7007e9454d00
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1259318308.912:27860): avc:  denied  { read } for  pid=5469 comm="qemu-kvm" name="images" dev=dm-1 ino=192981 scontext=system_u:system_r:svirt_t:s0:c739,c816 tcontext=unconfined_u:object_r:virt_var_lib_t:s0 tclass=lnk_file

node=(removed) type=SYSCALL msg=audit(1259318308.912:27860): arch=c000003e syscall=2 success=no exit=-13 a0=7fffd5c07e90 a1=1000 a2=1a4 a3=30 items=0 ppid=1 pid=5469 auid=500 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=1 comm="qemu-kvm" exe="/usr/bin/qemu-kvm" subj=system_u:system_r:svirt_t:s0:c739,c816 key=(null)



Hash String generated from  selinux-policy-3.6.32-46.fc12,catchall,qemu-kvm,svirt_t,virt_var_lib_t,lnk_file,read
audit2allow suggests:

#============= svirt_t ==============
allow svirt_t virt_var_lib_t:lnk_file read;

Comment 1 Daniel Walsh 2009-11-30 22:16:35 UTC
Did you setup a link file to a separate location for image files?

Comment 2 Daniel Walsh 2009-11-30 22:18:57 UTC
You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.6.32-52.fc12.noarch

Comment 3 Fedora Update System 2009-12-01 16:53:08 UTC
selinux-policy-3.6.32-52.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-52.fc12

Comment 4 Fedora Update System 2009-12-03 05:00:21 UTC
selinux-policy-3.6.32-52.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12549

Comment 5 Fedora Update System 2009-12-03 20:25:12 UTC
selinux-policy-3.6.32-55.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-55.fc12

Comment 6 Fedora Update System 2009-12-04 23:43:16 UTC
selinux-policy-3.6.32-55.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12650

Comment 7 Fedora Update System 2009-12-08 07:49:54 UTC
selinux-policy-3.6.32-55.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2010-08-05 13:22:14 UTC
selinux-policy-3.6.32-120.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12

Comment 9 Fedora Update System 2010-08-20 01:42:14 UTC
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.