Bug 1600597

Summary: SELinux prevents ntpdate-wrapper from 'execute_no_trans' accesses on the file /usr/sbin/ntpdate
Product: Red Hat Enterprise Linux 7 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: lvrabec, mgrepl, mmalik, plautrba, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: abrt_hash:d42d0aeab8a66f90a5b7bc33d6465b4e089ea6cbdc4898864a0a9fb61a606d3c;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1470892 Environment:
Last Closed: 2018-10-30 10:07:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2018-07-12 14:52:30 UTC
+++ This bug was initially created as a clone of Bug #1470892 +++

Description of problem:
 * the ntpdate service cannot start because of SELinux denial

NVRs:
ntp-4.2.6p5-28.el7.x86_64
ntpdate-4.2.6p5-28.el7.x86_64
selinux-policy-3.13.1-207.el7.noarch
selinux-policy-devel-3.13.1-207.el7.noarch
selinux-policy-doc-3.13.1-207.el7.noarch
selinux-policy-minimum-3.13.1-207.el7.noarch
selinux-policy-mls-3.13.1-207.el7.noarch
selinux-policy-sandbox-3.13.1-207.el7.noarch
selinux-policy-targeted-3.13.1-207.el7.noarch

Reproducible:
 * always

Steps to Reproduce:
1) get a RHEL-7.6 machine (targeted policy is active)
2) start the ntpdate service
3) search for SELinux denials

Actual results:
----
type=PROCTITLE msg=audit(07/12/2018 16:49:29.510:478) : proctitle=/bin/bash /usr/libexec/ntpdate-wrapper 
type=PATH msg=audit(07/12/2018 16:49:29.510:478) : item=0 name=/usr/sbin/ntpdate inode=551862 dev=fd:03 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ntpdate_exec_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(07/12/2018 16:49:29.510:478) : cwd=/ 
type=SYSCALL msg=audit(07/12/2018 16:49:29.510:478) : arch=x86_64 syscall=execve success=no exit=EACCES(Permission denied) a0=0x14f1a60 a1=0x14eeef0 a2=0x14eeb20 a3=0x7fffade453a0 items=1 ppid=11471 pid=11479 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=ntpdate-wrapper exe=/usr/bin/bash subj=system_u:system_r:ntpd_t:s0 key=(null) 
type=AVC msg=audit(07/12/2018 16:49:29.510:478) : avc:  denied  { execute_no_trans } for  pid=11479 comm=ntpdate-wrapper path=/usr/sbin/ntpdate dev="vda3" ino=551862 scontext=system_u:system_r:ntpd_t:s0 tcontext=system_u:object_r:ntpdate_exec_t:s0 tclass=file permissive=0 
----

Expected results:
 * no SELinux denials
 * the service is successful

Comment 4 errata-xmlrpc 2018-10-30 10:07:08 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-2018:3111