Bug 1661722 - SELinux is preventing alsactl from 'open' accesses on the file /var/lib/alsa/asound.state.
Summary: SELinux is preventing alsactl from 'open' accesses on the file /var/lib/alsa/...
Keywords:
Status: CLOSED DUPLICATE of bug 1661719
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c8de801b0dfed4e087e51cff4b0...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-22 17:44 UTC by Mikhail
Modified: 2019-01-08 16:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-08 16:50:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2018-12-22 17:44:17 UTC
Description of problem:
SELinux is preventing alsactl from 'open' accesses on the file /var/lib/alsa/asound.state.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/lib/alsa/asound.state default label should be alsa_var_lib_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/lib/alsa/asound.state

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that alsactl should be allowed open access on the asound.state 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:
# ausearch -c 'alsactl' --raw | audit2allow -M my-alsactl
# semodule -X 300 -i my-alsactl.pp

Additional Information:
Source Context                system_u:system_r:alsa_t:s0
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /var/lib/alsa/asound.state [ file ]
Source                        alsactl
Source Path                   alsactl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.3-15.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.20.0-0.rc7.git1.1.fc30.x86_64 #1
                              SMP Tue Dec 18 22:52:01 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-12-22 21:29:25 +05
Last Seen                     2018-12-22 21:29:25 +05
Local ID                      bbc88ca6-db27-45db-b8b4-216c173b71de

Raw Audit Messages
type=AVC msg=audit(1545496165.494:624): avc:  denied  { open } for  pid=1045 comm="alsactl" path="/var/lib/alsa/asound.state" dev="nvme0n1p2" ino=2883880 scontext=system_u:system_r:alsa_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=1


Hash: alsactl,alsa_t,unlabeled_t,file,open

Version-Release number of selected component:
selinux-policy-3.14.3-15.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.7
hashmarkername: setroubleshoot
kernel:         4.20.0-0.rc7.git1.1.fc30.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-01-08 16:50:13 UTC

*** This bug has been marked as a duplicate of bug 1661719 ***


Note You need to log in before you can comment on or make changes to this bug.