Bug 901469 - SELinux is preventing /usr/bin/bash from 'execute' accesses on the file /usr/sbin/mdadm.
Summary: SELinux is preventing /usr/bin/bash from 'execute' accesses on the file /usr/...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b2f9518f9294d864ac1ed829d0f...
: 901468 (view as bug list)
Depends On:
Blocks: 903316
TreeView+ depends on / blocked
 
Reported: 2013-01-18 09:33 UTC by Frank Murphy
Modified: 2013-02-04 11:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 903316 (view as bug list)
Environment:
Last Closed: 2013-01-25 21:45:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Frank Murphy 2013-01-18 09:33:52 UTC
Description of problem:
SELinux is preventing /usr/bin/bash from 'execute' accesses on the file /usr/sbin/mdadm.

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

If you believe that bash should be allowed execute 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:
# grep sh /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:logwatch_t:s0-s0:c0.c1023
Target Context                system_u:object_r:mdadm_exec_t:s0
Target Objects                /usr/sbin/mdadm [ file ]
Source                        sh
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.42-1.fc18.x86_64
Target RPM Packages           mdadm-3.2.6-11.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-69.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.2-201.fc18.x86_64 #1 SMP Fri
                              Jan 11 22:16:23 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-01-18 03:15:06 GMT
Last Seen                     2013-01-18 03:15:06 GMT
Local ID                      48f43e4b-2eb5-4a37-bc30-17b6acea40fd

Raw Audit Messages
type=AVC msg=audit(1358478906.424:521): avc:  denied  { execute } for  pid=5884 comm="sh" name="mdadm" dev="dm-0" ino=16727 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mdadm_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1358478906.424:521): arch=x86_64 syscall=access success=no exit=EACCES a0=261e7d0 a1=1 a2=7fffcd2af8d0 a3=20 items=0 ppid=5883 pid=5884 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=27 tty=(none) comm=sh exe=/usr/bin/bash subj=system_u:system_r:logwatch_t:s0-s0:c0.c1023 key=(null)

Hash: sh,logwatch_t,mdadm_exec_t,file,execute

audit2allow

#============= logwatch_t ==============
allow logwatch_t mdadm_exec_t:file execute;

audit2allow -R

#============= logwatch_t ==============
allow logwatch_t mdadm_exec_t:file execute;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.2-201.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-01-18 09:52:43 UTC
*** Bug 901468 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2013-01-18 13:16:00 UTC
Did you configure logwatch+mdadm together?

Comment 3 Frank Murphy 2013-01-18 13:24:11 UTC
As far as I know, haven't touched logwatch,  
I don't use mdadm. It only there for udisks and yumex.

Comment 4 Miroslav Grepl 2013-01-18 13:38:04 UTC
Ok, this access check. 

Fixed in selinux-policy-3.11.1-72.fc18

Comment 5 Fedora Update System 2013-01-21 23:36:14 UTC
selinux-policy-3.11.1-73.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-73.fc18

Comment 6 Fedora Update System 2013-01-23 01:57:56 UTC
Package selinux-policy-3.11.1-73.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-73.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1272/selinux-policy-3.11.1-73.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-01-25 21:45:31 UTC
selinux-policy-3.11.1-73.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 JM 2013-02-04 02:43:27 UTC
Fedora 17 has the same problem, so could the rpm please pushed to the Fedora 17 stable reposity as well?

Comment 9 Miroslav Grepl 2013-02-04 11:40:04 UTC
Yes. Will do it today.

commit 730417aa6eae8389c2f3f13c835a801eea2a5b04
Author: Miroslav Grepl <mgrepl>
Date:   Mon Feb 4 12:38:52 2013 +0100

    Allow logwatch to domtrans to mdadm

in F17.


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