Bug 1425357

Summary: AVC: nmbd calls epoll_ctl
Product: Red Hat Enterprise Linux 7 Reporter: Robin Hack <rhack>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: jjelen, lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-130.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 15:22:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Robin Hack 2017-02-21 09:36:05 UTC
Description of problem:
Hello. After rebase to samba 4.6 looks like nmbd needs epoll_ctl syscall allowed by selinux.


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. use nmbd
2.
3.

Actual results:
[ ERROR ] AVC check: FAIL
----
type=SYSCALL msg=audit(02/21/17 04:28:24.374:379) : arch=x86_64 syscall=epoll_ctl success=yes exit=0 a0=0x4 a1=EPOLL_CTL_DEL a2=0x15 a3=0x7ffe13f9ce80 items=0 ppid=1 pid=2787 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=nmbd exe=/usr/sbin/nmbd subj=system_u:system_r:nmbd_t:s0 key=(null)
type=AVC msg=audit(02/21/17 04:28:24.374:379) : avc:  denied  { block_suspend } for  pid=2787 comm=nmbd capability=block_suspend  scontext=system_u:system_r:nmbd_t:s0 tcontext=system_u:system_r:nmbd_t:s0 tclass=capability2
----
type=SYSCALL msg=audit(02/21/17 04:28:24.374:380) : arch=x86_64 syscall=epoll_ctl success=yes exit=0 a0=0x4 a1=EPOLL_CTL_DEL a2=0x14 a3=0x7ffe13f9ce80 items=0 ppid=1 pid=2787 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=nmbd exe=/usr/sbin/nmbd subj=system_u:system_r:nmbd_t:s0 key=(null)
type=AVC msg=audit(02/21/17 04:28:24.374:380) : avc:  denied  { block_suspend } for  pid=2787 comm=nmbd capability=block_suspend  scontext=system_u:system_r:nmbd_t:s0 tcontext=system_u:system_r:nmbd_t:s0 tclass=capability2
----
type=SYSCALL msg=audit(02/21/17 04:28:24.374:381) : arch=x86_64 syscall=epoll_ctl success=yes exit=0 a0=0x4 a1=EPOLL_CTL_DEL a2=0x13 a3=0x7ffe13f9ce80 items=0 ppid=1 pid=2787 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=nmbd exe=/usr/sbin/nmbd subj=system_u:system_r:nmbd_t:s0 key=(null)
type=AVC msg=audit(02/21/17 04:28:24.374:381) : avc:  denied  { block_suspend } for  pid=2787 comm=nmbd capability=block_suspend  scontext=system_u:system_r:nmbd_t:s0 tcontext=system_u:system_r:nmbd_t:s0 tclass=capability2
----
type=SYSCALL msg=audit(02/21/17 04:28:24.374:382) : arch=x86_64 syscall=epoll_ctl success=yes exit=0 a0=0x4 a1=EPOLL_CTL_DEL a2=0x12 a3=0x7ffe13f9ce80 items=0 ppid=1 pid=2787 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=nmbd exe=/usr/sbin/nmbd subj=system_u:system_r:nmbd_t:s0 key=(null)
type=AVC msg=audit(02/21/17 04:28:24.374:382) : avc:  denied  { block_suspend } for  pid=2787 comm=nmbd capability=block_suspend  scontext=system_u:system_r:nmbd_t:s0 tcontext=system_u:system_r:nmbd_t:s0 tclass=capability2


Expected results:


Additional info:

Comment 2 Milos Malik 2017-02-21 09:50:33 UTC
Confirmed. I can reproduce the SELinux denials with following packages:

# rpm -qa selinux-policy\* samba\* | sort
samba-4.6.0-0.1.rc3.el7.x86_64
samba-client-libs-4.6.0-0.1.rc3.el7.x86_64
samba-common-4.6.0-0.1.rc3.el7.noarch
samba-common-libs-4.6.0-0.1.rc3.el7.x86_64
samba-common-tools-4.6.0-0.1.rc3.el7.x86_64
samba-libs-4.6.0-0.1.rc3.el7.x86_64
samba-winbind-4.6.0-0.1.rc3.el7.x86_64
samba-winbind-modules-4.6.0-0.1.rc3.el7.x86_64
selinux-policy-3.13.1-121.el7.noarch
selinux-policy-targeted-3.13.1-121.el7.noarch
#

Comment 7 Lukas Vrabec 2017-06-05 14:46:52 UTC
*** Bug 1458777 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2017-08-01 15:22:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1861