Bug 1560317

Summary: SELinux is preventing sh from 'getattr' accesses on the file /usr/sbin/mdadm.
Product: [Fedora] Fedora Reporter: Subhendu Ghosh <sghosh>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:96aef9d53eec88407e49cfb08071223732d090b6b749b51b6728171cd410358b;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-283.32.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-27 01:18:24 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 Subhendu Ghosh 2018-03-25 23:57:51 UTC
Description of problem:
SELinux is preventing sh from 'getattr' accesses on the file /usr/sbin/mdadm.

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

If you believe that sh should be allowed getattr access on the mdadm 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 'sh' --raw | audit2allow -M my-sh
# semodule -X 300 -i my-sh.pp

Additional Information:
Source Context                system_u:system_r:pcp_pmcd_t:s0
Target Context                system_u:object_r:mdadm_exec_t:s0
Target Objects                /usr/sbin/mdadm [ file ]
Source                        sh
Source Path                   sh
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           mdadm-4.0-5.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-283.28.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.10-300.fc27.x86_64 #1 SMP Thu
                              Mar 15 17:13:04 UTC 2018 x86_64 x86_64
Alert Count                   388
First Seen                    2018-03-25 18:20:03 EDT
Last Seen                     2018-03-25 19:56:03 EDT
Local ID                      e98dc78c-0ce5-4243-a274-1885870f4292

Raw Audit Messages
type=AVC msg=audit(1522022163.960:1102): avc:  denied  { getattr } for  pid=13380 comm="sh" path="/usr/sbin/mdadm" dev="dm-0" ino=1381354 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:mdadm_exec_t:s0 tclass=file permissive=0


Hash: sh,pcp_pmcd_t,mdadm_exec_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-283.28.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.15.10-300.fc27.x86_64
type:           libreport

Comment 1 Fedora Update System 2018-04-16 11:33:05 UTC
selinux-policy-3.13.1-283.32.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d3085b9774

Comment 2 Fedora Update System 2018-04-18 02:59:23 UTC
selinux-policy-3.13.1-283.32.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-d3085b9774

Comment 3 Fedora Update System 2018-04-27 01:18:24 UTC
selinux-policy-3.13.1-283.32.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.