Bug 1157770

Summary: SELinux is preventing cat from 'getattr' accesses on the file /proc/mdstat.
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: awilliam, dominick.grift, dwalsh, lvrabec, mgrepl, mmalik, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:cf4bf4c454353c0b3525d20e31b0983f348699ef99219eeae14a961ddb7b28e2
Fixed In Version: selinux-policy-3.13.1-99.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-03 17:15:19 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 Kamil Páral 2014-10-27 16:34:14 UTC
Description of problem:
I received this at the end of anaconda installation when debugging bug 1157657.
SELinux is preventing cat from 'getattr' accesses on the file /proc/mdstat.

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

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

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:proc_mdstat_t:s0
Target Objects                /proc/mdstat [ file ]
Source                        cat
Source Path                   cat
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-90.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.17.1-302.fc21.x86_64 #1 SMP Fri
                              Oct 17 20:05:46 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-10-27 12:30:31 EDT
Last Seen                     2014-10-27 12:30:31 EDT
Local ID                      cd6c74d4-247a-4ab1-8638-4ca58e9d039e

Raw Audit Messages
type=AVC msg=audit(1414427431.98:465): avc:  denied  { getattr } for  pid=2989 comm="cat" path="/proc/mdstat" dev="proc" ino=4026531986 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_mdstat_t:s0 tclass=file permissive=1


Hash: cat,abrt_t,proc_mdstat_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-90.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.1-302.fc21.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2014-11-03 12:25:33 UTC
commit e481cb3bed5f2de4e2ecd2e5c427e5346af62072
Author: Lukas Vrabec <lvrabec>
Date:   Mon Nov 3 13:23:16 2014 +0100

    Allow abrt to read software raid state. BZ (1157770)

Comment 2 Fedora Update System 2014-11-21 12:23:59 UTC
selinux-policy-3.13.1-99.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-99.fc21

Comment 3 Adam Williamson 2014-11-28 03:50:09 UTC
Description of problem:
Did a UEFI install to Intel firmware RAID-0 of an F21 RC1 smoketest live image (basically same package set as RC1) over an existing BIOS install of the same image to the same firmware RAID set.

Version-Release number of selected component:
selinux-policy-3.13.1-92.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.4-301.fc21.x86_64
type:           libreport

Comment 4 Fedora Update System 2014-12-03 17:15:19 UTC
selinux-policy-3.13.1-99.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.