Bug 521400 - setroubleshoot: SELinux is preventing mdadm "read" access on .mdadm.map.
Summary: setroubleshoot: SELinux is preventing mdadm "read" access on .mdadm.map.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mdadm
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:636a2fb31d5...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-05 14:39 UTC by Nicolas Mailhot
Modified: 2009-09-09 21:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-09 21:44:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nicolas Mailhot 2009-09-05 14:39:41 UTC
The following was filed automatically by setroubleshoot:

Résumé:

SELinux is preventing mdadm "read" access on .mdadm.map.

Description détaillée:

[mdadm has a permissive type (mdadm_t). This access was not denied.]

SELinux denied access requested by mdadm. It is not expected that this access is
required by mdadm and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Autoriser l'accès:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Informations complémentaires:

Contexte source               system_u:system_r:mdadm_t:s0-s0:c0.c1023
Contexte cible                system_u:object_r:device_t:s0
Objets du contexte            .mdadm.map [ file ]
source                        mdadm
Chemin de la source           /sbin/mdadm
Port                          <Inconnu>
Hôte                         (removed)
Paquetages RPM source         mdadm-3.0-2.fc12
Paquetages RPM cible          
Politique RPM                 selinux-policy-3.6.30-2.fc12
Selinux activé               True
Type de politique             targeted
MLS activé                   True
Mode strict                   Enforcing
Nom du plugin                 catchall
Nom de l'hôte                (removed)
Plateforme                    Linux (removed) 2.6.31-0.203.rc8.git2.fc12.x86_64
                              #1 SMP Fri Sep 4 21:33:05 EDT 2009 x86_64 x86_64
Compteur d'alertes            4
Première alerte              sam. 05 sept. 2009 16:14:40 CEST
Dernière alerte              sam. 05 sept. 2009 16:15:14 CEST
ID local                      c34b9fee-09d3-47d3-ba89-9358dd861db9
Numéros des lignes           

Messages d'audit bruts        

node=(removed) type=AVC msg=audit(1252160114.831:59): avc:  denied  { read } for  pid=1966 comm="mdadm" name=".mdadm.map" dev=tmpfs ino=11245 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1252160114.831:59): avc:  denied  { open } for  pid=1966 comm="mdadm" name=".mdadm.map" dev=tmpfs ino=11245 scontext=system_u:system_r:mdadm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1252160114.831:59): arch=c000003e syscall=2 success=yes exit=0 a0=441846 a1=0 a2=180 a3=3733363037653731 items=0 ppid=1843 pid=1966 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="/sbin/mdadm" subj=system_u:system_r:mdadm_t:s0-s0:c0.c1023 key=(null)


audit2allow suggests:

#============= mdadm_t ==============
allow mdadm_t device_t:file { read open };

Comment 1 Daniel Walsh 2009-09-08 22:18:53 UTC
For some reason a file .mdadm.map was created under /dev.

Comment 2 Daniel Walsh 2009-09-08 22:19:57 UTC
Doug,

Any reason this file is created in /dev rather then under /var/run/mdadm?

Is this file being created by mdadm?

Comment 3 Doug Ledford 2009-09-09 13:29:39 UTC
Yes, /var/run/mdadm is often times read only when we are doing the initial incremental assembly of arrays.  If mdadm can not create its map file, then it doesn't do incremental assembly properly.  The map file was moved to /dev because it is always read/write by the time we are doing incremental assembly and therefore solves the issue.

Comment 4 Daniel Walsh 2009-09-09 21:44:42 UTC
Fixed in selinux-policy-3.6.31-2.fc12.noarch

/dev/.mdadm.map		--	gen_context(system_u:object_r:mdadm_map_t,s0)


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