Bug 1600705

Summary: SELinux prevents the kprop service from starting
Product: Red Hat Enterprise Linux 7 Reporter: Patrik Kis <pkis>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: lmiksik, lvrabec, mgrepl, mmalik, mthacker, plautrba, ssekidde
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-213.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:07:08 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:
Embargoed:

Description Patrik Kis 2018-07-12 20:01:38 UTC
Description of problem:
The policy "allow krb5kdc_t krb5kdc_exec_t : file execute_no_trans ;" was removed from the latest version of selinux-policy. This is a regression.

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-207.el7

How reproducible:
always

Steps to Reproduce:

1. The following step is needed to start the krpopd service
# touch /var/kerberos/krb5kdc/kpropd.acl

2. Try to start
# systemctl start kprop.service


Actual results:
# ausearch -m avc -i -ts recent
----
type=PROCTITLE msg=audit(07/12/2018 19:55:51.859:228) : proctitle=/bin/sh /usr/sbin/_kpropd 
type=SYSCALL msg=audit(07/12/2018 19:55:51.859:228) : arch=x86_64 syscall=execve success=no exit=EACCES(Permission denied) a0=0x1455a30 a1=0x1455bc0 a2=0x1455d00 a3=0x7ffc19390060 items=0 ppid=1 pid=8507 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=_kpropd exe=/usr/bin/bash subj=system_u:system_r:kpropd_t:s0 key=(null) 
type=AVC msg=audit(07/12/2018 19:55:51.859:228) : avc:  denied  { execute_no_trans } for  pid=8507 comm=_kpropd path=/usr/sbin/kpropd dev="dm-0" ino=1556427 scontext=system_u:system_r:kpropd_t:s0 tcontext=system_u:object_r:kpropd_exec_t:s0 tclass=file permissive=0 


Expected results:
no AVC denials

Additional info:
This policy disappeared from the current version:

# rpm -q selinux-policy
selinux-policy-3.13.1-192.el7.noarch
# sesearch -A -C -s krb5kdc_t -t krb5kdc_exec_t -c file
Found 1 semantic av rules:
   allow krb5kdc_t krb5kdc_exec_t : file { ioctl read getattr lock execute execute_no_trans entrypoint open } ;

Comment 2 Milos Malik 2018-07-12 20:28:14 UTC
Caught in enforcing mode:
----
type=PROCTITLE msg=audit(07/12/2018 22:24:56.198:501) : proctitle=/bin/sh /usr/sbin/_kpropd 
type=PATH msg=audit(07/12/2018 22:24:56.198:501) : item=0 name=/usr/sbin/kpropd inode=867046 dev=fd:03 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:kpropd_exec_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(07/12/2018 22:24:56.198:501) : cwd=/ 
type=SYSCALL msg=audit(07/12/2018 22:24:56.198:501) : arch=x86_64 syscall=execve success=no exit=EACCES(Permission denied) a0=0x1d7ca90 a1=0x1d7cc20 a2=0x1d7cd60 a3=0x7ffe07547ee0 items=1 ppid=1 pid=67303 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=_kpropd exe=/usr/bin/bash subj=system_u:system_r:kpropd_t:s0 key=(null) 
type=AVC msg=audit(07/12/2018 22:24:56.198:501) : avc:  denied  { execute_no_trans } for  pid=67303 comm=_kpropd path=/usr/sbin/kpropd dev="vda3" ino=867046 scontext=system_u:system_r:kpropd_t:s0 tcontext=system_u:object_r:kpropd_exec_t:s0 tclass=file permissive=0 
----

Reproducible on both RHEL-7.6 and RHEL-ALT-7.6.

Comment 9 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