Bug 728915

Summary: SELinux is preventing /sbin/alsactl from 'read' accesses on the file .asoundrc.
Product: [Fedora] Fedora Reporter: Valentin <v.balt>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:62d6c889b203147b1009d8cd65a6b09c1d3cbc888023e6760863489b563f2e17
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-08 14:20:18 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 Valentin 2011-08-08 11:37:03 UTC
SELinux is preventing /sbin/alsactl from 'read' accesses on the file .asoundrc.

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

If you believe that alsactl should be allowed read access on the .asoundrc 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 alsactl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:alsa_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                .asoundrc [ file ]
Source                        alsactl
Source Path                   /sbin/alsactl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           alsa-utils-1.0.24.1-3.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-35.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40-4.fc15.i686.PAE #1 SMP Fri Jul
                              29 18:47:58 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Mon 08 Aug 2011 02:31:53 PM EEST
Last Seen                     Mon 08 Aug 2011 02:31:53 PM EEST
Local ID                      b182e9a4-5c00-4f46-92e8-fb1d2c5cc4e1

Raw Audit Messages
type=AVC msg=audit(1312803113.479:168): avc:  denied  { read } for  pid=8456 comm="alsactl" name=".asoundrc" dev=dm-0 ino=411227 scontext=unconfined_u:unconfined_r:alsa_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1312803113.479:168): arch=i386 syscall=access success=no exit=EACCES a0=94a4a88 a1=4 a2=4426c308 a3=1 items=0 ppid=8319 pid=8456 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=7 comm=alsactl exe=/sbin/alsactl subj=unconfined_u:unconfined_r:alsa_t:s0-s0:c0.c1023 key=(null)

Hash: alsactl,alsa_t,user_home_t,file,read

audit2allow

#============= alsa_t ==============
#!!!! This avc is allowed in the current policy

allow alsa_t user_home_t:file read;

audit2allow -R

#============= alsa_t ==============
#!!!! This avc is allowed in the current policy

allow alsa_t user_home_t:file read;

Comment 1 Miroslav Grepl 2011-08-08 14:20:18 UTC
This is a mislabled file.

Execute

# restoreco -R -v ~/.asoundrc