Bug 1119883

Summary: SELinux is preventing /usr/sbin/nmbd from 'open' accesses on the file /proc/sys/kernel/core_pattern.
Product: [Fedora] Fedora Reporter: magnus
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: atu, dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:328850f05c892af6d6a15b309a84c668e9414b51e5ac38ba6ac76a1724f92582
Fixed In Version: selinux-policy-3.13.1-79.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-23 04:45:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description magnus 2014-07-15 18:01:13 UTC
Description of problem:
SELinux is preventing /usr/sbin/nmbd from 'open' accesses on the file /proc/sys/kernel/core_pattern.

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

If you believe that nmbd should be allowed open access on the core_pattern file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep nmbd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:nmbd_t:s0
Target Context                system_u:object_r:usermodehelper_t:s0
Target Objects                /proc/sys/kernel/core_pattern [ file ]
Source                        nmbd
Source Path                   /usr/sbin/nmbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-4.1.9-3.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-63.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.0-0.rc4.git3.1.fc21.x86_64 #1
                              SMP Fri Jul 11 17:13:44 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-07-15 19:59:55 CEST
Last Seen                     2014-07-15 19:59:55 CEST
Local ID                      d54173d5-12e4-4262-a188-55fb8660109a

Raw Audit Messages
type=AVC msg=audit(1405447195.131:160): avc:  denied  { open } for  pid=2334 comm="nmbd" path="/proc/sys/kernel/core_pattern" dev="proc" ino=10416 scontext=system_u:system_r:nmbd_t:s0 tcontext=system_u:object_r:usermodehelper_t:s0 tclass=file permissive=0

type=SYSCALL msg=audit(1405447195.131:160): arch=x86_64 syscall=open success=no exit=EACCES a0=7fb61a12de0a a1=0 a2=0 a3=0 items=0 ppid=1 pid=2334 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=nmbd exe=/usr/sbin/nmbd subj=system_u:system_r:nmbd_t:s0 key=(null)

Hash: nmbd,nmbd_t,usermodehelper_t,file,open

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.0-0.rc4.git3.1.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-07-15 22:41:26 UTC
Any idea why nmbd would be trying to read this file?

Comment 2 magnus 2014-07-16 10:10:31 UTC
I just upgraded from F17 via F18, so it's a old config.
A quick Google search seems to indicate that Samba scans all mounts on startup.

Comment 3 Daniel Walsh 2014-08-06 22:40:57 UTC
Well this is not a mount it is an open.But I don't see a problem with allowing it to read it.

Comment 4 Miroslav Grepl 2014-09-04 12:27:35 UTC
commit c095f4d547287c5354c3db9dc0e6ea50c69dc0e6
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Thu Sep 4 14:27:15 2014 +0200

    Allow nmbd to read /proc/sys/kernel/core_pattern.

Comment 5 Fedora Update System 2014-09-10 09:28:33 UTC
selinux-policy-3.13.1-79.fc21 has been submitted as an update for Fedora 21.

Comment 6 Fedora Update System 2014-09-10 16:42:49 UTC
Package selinux-policy-3.13.1-79.fc21:
* should fix your issue,
* was pushed to the Fedora 21 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.13.1-79.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-09-23 04:45:16 UTC
selinux-policy-3.13.1-79.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.