Bug 1168998

Summary: SELinux is preventing /usr/sbin/mdadm from 'getattr' accesses on the file .
Product: [Fedora] Fedora Reporter: Mike Walker <stcwalker3>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:64b50ad6e2fc4d52538fd8e29840a7d7d9b8ece0ae00981344574ccbb6137b57
Fixed In Version: selinux-policy-3.12.1-197.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-10 00:55:53 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 Mike Walker 2014-11-28 18:19:35 UTC
Description of problem:
I have encrytion on and I believe thats what caused it. My Dropbox starts up before I login to the drive causing Dropbox to freak out and say that it can't find the drive. I don't believe its a bug, I believe its an unhandled event.
SELinux is preventing /usr/sbin/mdadm from 'getattr' accesses on the file .

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

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

Additional Information:
Source Context                system_u:system_r:mdadm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:initrc_state_t:s0
Target Objects                 [ file ]
Source                        mdadm
Source Path                   /usr/sbin/mdadm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mdadm-3.3-7.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-193.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.17.3-200.fc20.x86_64 #1 SMP Fri
                              Nov 14 19:45:42 UTC 2014 x86_64 x86_64
Alert Count                   8
First Seen                    2014-11-28 12:47:28 EST
Last Seen                     2014-11-28 13:14:44 EST
Local ID                      8958b4d8-56bb-43ed-99ff-564942773e5f

Raw Audit Messages
type=AVC msg=audit(1417198484.370:387): avc:  denied  { getattr } for  pid=2728 comm="mdadm" path="/dev/shm/sem.9334581e-7251-4ef7-a8ec-5bfe8e89ff68" dev="tmpfs" ino=21915 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:initrc_state_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1417198484.370:387): arch=x86_64 syscall=newfstatat success=no exit=EACCES a0=5 a1=8b3113 a2=7fff698b2560 a3=100 items=0 ppid=2727 pid=2728 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=mdadm exe=/usr/sbin/mdadm subj=system_u:system_r:mdadm_t:s0-s0:c0.c1023 key=(null)

Hash: mdadm,mdadm_t,initrc_state_t,file,getattr

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.17.3-200.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2015-01-02 14:50:26 UTC
5357cd3043d9a34191c2bce67f0c9e304d1621ca allows this in git.

Comment 2 Lukas Vrabec 2015-01-15 15:29:44 UTC
commit b79578d5566900635f04df05714505452061c7d1
Author: Dan Walsh <dwalsh>
Date:   Fri Jan 2 09:50:00 2015 -0500

    Allow mdadm_t to getattr on init status files

Comment 3 Fedora Update System 2015-01-27 16:56:45 UTC
selinux-policy-3.12.1-197.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-197.fc20

Comment 4 Fedora Update System 2015-01-30 04:41:41 UTC
Package selinux-policy-3.12.1-197.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.12.1-197.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1398/selinux-policy-3.12.1-197.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2015-03-10 00:55:53 UTC
selinux-policy-3.12.1-197.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.