Bug 1045735 - SELinux is preventing /usr/sbin/mdadm from 'read' accesses on the chr_file tpm0.
Summary: SELinux is preventing /usr/sbin/mdadm from 'read' accesses on the chr_file tpm0.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: mdadm
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jes Sorensen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1c599a966828960dc2e2f60633f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-21 16:03 UTC by Frank Büttner
Modified: 2015-02-18 11:01 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-18 11:01:12 UTC
Type: ---


Attachments (Terms of Use)

Description Frank Büttner 2013-12-21 16:03:11 UTC
Description of problem:
SELinux is preventing /usr/sbin/mdadm from 'read' accesses on the chr_file tpm0.

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

If sie denken, dass es mdadm standardmässig erlaubt sein sollte, read Zugriff auf tpm0 chr_file zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# 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:tpm_device_t:s0
Target Objects                tpm0 [ chr_file ]
Source                        mdadm
Source Path                   /usr/sbin/mdadm
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           mdadm-3.2.6-21.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.15.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.5-200.fc19.x86_64 #1 SMP Tue
                              Dec 17 22:21:14 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-12-21 10:23:05 CET
Last Seen                     2013-12-21 10:23:05 CET
Local ID                      91eb41d5-d5b5-428d-af19-87798055fcf5

Raw Audit Messages
type=AVC msg=audit(1387617785.255:183): avc:  denied  { read } for  pid=14228 comm="mdadm" name="tpm0" dev="devtmpfs" ino=11043 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tpm_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1387617785.255:183): arch=x86_64 syscall=open success=no exit=EACCES a0=218c600 a1=4000 a2=a a3=7fff31968fb0 items=0 ppid=14227 pid=14228 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4 tty=(none) comm=mdadm exe=/usr/sbin/mdadm subj=system_u:system_r:mdadm_t:s0-s0:c0.c1023 key=(null)

Hash: mdadm,mdadm_t,tpm_device_t,chr_file,read

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.12.5-200.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-01-02 23:08:49 UTC
Does mdadm actually need to read the tpm divice?

Comment 2 Frank Büttner 2014-01-03 16:39:19 UTC
Good question I don't know for what.

Comment 3 Jes Sorensen 2014-01-07 16:11:11 UTC
I am guessing here that mdadm is walking the /dev devices examining them to see
if they contain a raid signature, but it's puzzling it would open a char device
for this.

Could you please provide the arguments used to launch mdadm when this warning
was spawned?

Jes

Comment 4 Frank Büttner 2014-01-07 17:57:25 UTC
It was not called manual. It was called during install some package updates.
I think it can be only an kernel package or is it calling during other updates?

Comment 5 Jes Sorensen 2014-01-10 10:32:00 UTC
It's never called by the kernel directly, but via a callback or from the
initramfs scripts directly.

Comment 6 Daniel Walsh 2014-01-10 18:32:13 UTC
Miroslav lets add a dontaudit rule for all devices.

612a0c118d774625007619edbe34fc3a881914dc fixes this in git.

Comment 7 Miroslav Grepl 2014-01-20 10:41:33 UTC
Has been added.

Comment 8 Jes Sorensen 2014-10-22 16:10:16 UTC
With Fedora 21 about to come out - I wanted to hear if you feel this is still
an issue or can we close this bug?

Thanks,
Jes

Comment 9 Fedora End Of Life 2015-01-09 22:23:08 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-02-18 11:01:12 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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