Bug 919818

Summary: SELinux is preventing /usr/bin/qemu-kvm from 'getattr' accesses on the blk_file /dev/sdc1.
Product: [Fedora] Fedora Reporter: George Chalkitis <chalkitisge>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2096267b5003515fd5271ff3059931aed4e4d95ccdd75d224ddc28f97237c5d9
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-14 03:01:31 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 George Chalkitis 2013-03-10 09:01:29 UTC
Description of problem:
Using google chrome stable after hybernation.
SELinux is preventing /usr/bin/qemu-kvm from 'getattr' accesses on the blk_file /dev/sdc1.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that qemu-kvm should be allowed getattr access on the sdc1 blk_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep qemu-kvm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:svirt_t:s0:c181,c624
Target Context                system_u:object_r:fixed_disk_device_t:s0
Target Objects                /dev/sdc1 [ blk_file ]
Source                        qemu-kvm
Source Path                   /usr/bin/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-1.2.2-6.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-82.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.8.1-201.fc18.x86_64 #1 SMP Thu
                              Feb 28 19:23:08 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-03-10 04:20:21 EET
Last Seen                     2013-03-10 04:20:21 EET
Local ID                      e7bc36c9-8a46-4572-bace-61e67e174a8a

Raw Audit Messages
type=AVC msg=audit(1362882021.427:407): avc:  denied  { getattr } for  pid=25946 comm="qemu-kvm" path="/dev/sdc1" dev="devtmpfs" ino=9117 scontext=unconfined_u:system_r:svirt_t:s0:c181,c624 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file


type=SYSCALL msg=audit(1362882021.427:407): arch=x86_64 syscall=stat success=yes exit=0 a0=7f1afb221320 a1=7fff2f429600 a2=7fff2f429600 a3=1 items=0 ppid=1 pid=25946 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=qemu-kvm exe=/usr/bin/qemu-kvm subj=unconfined_u:system_r:svirt_t:s0:c181,c624 key=(null)

Hash: qemu-kvm,svirt_t,fixed_disk_device_t,blk_file,getattr

audit2allow

#============= svirt_t ==============
allow svirt_t fixed_disk_device_t:blk_file getattr;

audit2allow -R

#============= svirt_t ==============
allow svirt_t fixed_disk_device_t:blk_file getattr;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.1-201.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-03-11 14:11:45 UTC
Should your virtual machine be allowed to look at /dev/sdc1?  IE Does it use it?

Comment 2 Daniel Walsh 2013-03-11 14:13:01 UTC
16c50ac6b64b91eb96de4fbff15d5978d257b21e adds a dontaudit for this in Rawhide.

Comment 3 George Chalkitis 2013-03-11 22:50:09 UTC
(In reply to comment #1)
> Should your virtual machine be allowed to look at /dev/sdc1?  IE Does it use
> it?

Hello. 
Fedora is installed, not on virtual machine.I had several issues with chrome when i had the option for background apps running checked(on startup).I had to re install(i was on btrfs but now i am on LVM) because i messed up so i can not check anything.Seems to work fine now.

Comment 4 Miroslav Grepl 2013-03-12 10:26:12 UTC
back ported.

Comment 5 Fedora Update System 2013-03-12 13:56:03 UTC
selinux-policy-3.11.1-85.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2013-3605/selinux-policy-3.11.1-85.fc18

Comment 6 Fedora Update System 2013-03-12 23:38:00 UTC
Package selinux-policy-3.11.1-85.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-85.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3605/selinux-policy-3.11.1-85.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-03-14 03:01:33 UTC
selinux-policy-3.11.1-85.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.