Bug 849793

Summary: SELinux is preventing /usr/bin/qemu-kvm from 'getattr' accesses on the file /usr/share/alsa/alsa.conf.
Product: [Fedora] Fedora Reporter: Nicolas Chauvet (kwizart) <kwizart>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: berrange, clalancette, dominick.grift, dwalsh, itamar, jforbes, jyang, laine, libvirt-maint, mgrepl, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:0d85a99c44f5dd5759789bbc177fa09abc2b9b4c34bcb0baf2de346c4d73abd6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-10 21:39:42 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 Nicolas Chauvet (kwizart) 2012-08-20 21:37:49 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.5.2-1.fc17.x86_64
time:           lun. 20 août 2012 23:37:11 CEST

description:
:SELinux is preventing /usr/bin/qemu-kvm from 'getattr' accesses on the file /usr/share/alsa/alsa.conf.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that qemu-kvm should be allowed getattr access on the alsa.conf 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                system_u:system_r:svirt_t:s0:c232,c650
:Target Context                system_u:object_r:alsa_etc_rw_t:s0
:Target Objects                /usr/share/alsa/alsa.conf [ file ]
:Source                        qemu-kvm
:Source Path                   /usr/bin/qemu-kvm
:Port                          <Inconnu>
:Host                          (removed)
:Source RPM Packages           qemu-system-x86-1.0.1-1.fc17.x86_64
:Target RPM Packages           alsa-lib-1.0.25-3.fc17.x86_64 alsa-
:                              lib-1.0.25-3.fc17.i686
:Policy RPM                    selinux-policy-3.10.0-145.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.2-1.fc17.x86_64 #1 SMP Wed Aug
:                              15 16:09:27 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-08-20 23:35:54 CEST
:Last Seen                     2012-08-20 23:35:54 CEST
:Local ID                      404d622b-2fea-4f2e-8723-6f6b527212d5
:
:Raw Audit Messages
:type=AVC msg=audit(1345498554.369:182): avc:  denied  { getattr } for  pid=13656 comm="qemu-kvm" path="/usr/share/alsa/alsa.conf" dev="sdb5" ino=186110 scontext=system_u:system_r:svirt_t:s0:c232,c650 tcontext=system_u:object_r:alsa_etc_rw_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1345498554.369:182): arch=x86_64 syscall=stat success=no exit=EACCES a0=7f81f97214e0 a1=7fffb1df5df0 a2=7fffb1df5df0 a3=1a items=0 ppid=1 pid=13656 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=4294967295 comm=qemu-kvm exe=/usr/bin/qemu-kvm subj=system_u:system_r:svirt_t:s0:c232,c650 key=(null)
:
:Hash: qemu-kvm,svirt_t,alsa_etc_rw_t,file,getattr
:
:audit2allow
:
:#============= svirt_t ==============
:allow svirt_t alsa_etc_rw_t:file getattr;
:
:audit2allow -R
:
:#============= svirt_t ==============
:allow svirt_t alsa_etc_rw_t:file getattr;
:

Comment 1 Daniel Walsh 2012-09-17 16:09:52 UTC
Is this a virtual machine setup to play sound using pulseaudio?

Comment 2 Nicolas Chauvet (kwizart) 2012-09-17 18:36:32 UTC
Yes(In reply to comment #1)
> Is this a virtual machine setup to play sound using pulseaudio?
Yes, but only because it's a virtualized desktop.

Comment 3 Daniel Walsh 2012-09-17 23:04:41 UTC
Ok We should probably allow this.

Comment 4 Miroslav Grepl 2012-10-17 08:12:18 UTC
Added.

commit ebd7f592fce70e9b388c6965090911b6de966934
Author: Miroslav Grepl <mgrepl>
Date:   Wed Oct 17 10:11:59 2012 +0200

    Allow alsa to r/w alsa config files

Comment 5 Fedora Update System 2012-10-17 12:34:03 UTC
selinux-policy-3.10.0-156.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-156.fc17

Comment 6 Fedora Update System 2012-10-18 00:25:05 UTC
Package selinux-policy-3.10.0-156.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-156.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16347/selinux-policy-3.10.0-156.fc17
then log in and leave karma (feedback).