Bug 1276519 - SELinux is preventing mdadm from 'search' accesses on the directory /sys/firmware/efi/efivars.
Summary: SELinux is preventing mdadm from 'search' accesses on the directory /sys/firm...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:019ebf28a01d802a02e4f7b1486...
Depends On: 1287203
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-30 00:05 UTC by Jake Jackson
Modified: 2016-05-10 17:57 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-128.24.fc22 selinux-policy-3.13.1-128.28.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-10 17:57:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jake Jackson 2015-10-30 00:05:56 UTC
Description of problem:
I ran
# mdadm --assemble --scan
because the raid array for my raid1 disappeared
SELinux is preventing mdadm from 'search' accesses on the directory /sys/firmware/efi/efivars.

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

If you want to fix the label. 
/sys/firmware/efi/efivars default label should be sysfs_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /sys/firmware/efi/efivars

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

If you believe that mdadm should be allowed search access on the efivars directory 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:efivarfs_t:s0
Target Objects                /sys/firmware/efi/efivars [ dir ]
Source                        mdadm
Source Path                   mdadm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.18.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.3-200.fc22.x86_64 #1 SMP Thu
                              Oct 8 03:23:55 UTC 2015 x86_64 x86_64
Alert Count                   64
First Seen                    2015-10-30 01:03:00 CET
Last Seen                     2015-10-30 01:03:00 CET
Local ID                      a4b13c0f-e2eb-4fb2-8448-38aa6ce6caf2

Raw Audit Messages
type=AVC msg=audit(1446163380.739:802): avc:  denied  { search } for  pid=4172 comm="mdadm" name="/" dev="efivarfs" ino=12307 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:efivarfs_t:s0 tclass=dir permissive=0


Hash: mdadm,mdadm_t,efivarfs_t,dir,search

Version-Release number of selected component:
selinux-policy-3.13.1-128.18.fc22.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.3-200.fc22.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2015-12-17 14:13:21 UTC
commit 135f92e1ed354e120e5a31801d9a680ae48d6d2c
Author: Lukas Vrabec <lvrabec>
Date:   Thu Dec 17 15:10:59 2015 +0100

    Allow mdadm read files in EFI partotion. BZ(1287203, 1276519)

Comment 2 Fedora Update System 2016-01-18 13:19:57 UTC
selinux-policy-3.13.1-128.25.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-825869e1a4

Comment 3 Fedora Update System 2016-01-20 03:53:17 UTC
selinux-policy-3.13.1-128.25.fc22 has been pushed to the Fedora 22 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-2016-825869e1a4

Comment 4 Fedora Update System 2016-02-15 17:46:45 UTC
selinux-policy-3.13.1-128.27.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab

Comment 5 Fedora Update System 2016-02-17 06:26:05 UTC
selinux-policy-3.13.1-128.27.fc22 has been pushed to the Fedora 22 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-2016-ce419c9cab

Comment 6 Fedora Update System 2016-02-18 12:27:38 UTC
selinux-policy-3.13.1-128.28.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab

Comment 7 Fedora Update System 2016-02-21 18:29:02 UTC
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 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-2016-ce419c9cab

Comment 8 Fedora Update System 2016-05-10 17:55:47 UTC
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


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