Bug 1740146

Summary: selinux prevents auditd to use KRB5 peer authentication for remote logging
Product: Red Hat Enterprise Linux 8 Reporter: Ondrej Moriš <omoris>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: high    
Version: 8.1CC: lvrabec, mmalik, omosnace, plautrba, ssekidde, zpytela
Target Milestone: rcKeywords: AutoVerified
Target Release: 8.1Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1752577 (view as bug list) Environment:
Last Closed: 2019-11-05 22:12:10 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:
Bug Depends On:    
Bug Blocks: 1752577    

Description Ondrej Moriš 2019-08-12 11:22:05 UTC
Description of problem:

Current selinux policy prevents auditd to use KRB5 peer authentication for remote logging:

# ausearch -ts recent -m AVC -r
type=AVC msg=audit(1565607649.040:874): avc:  denied  { write } for  pid=22946 comm="auditd" name="tmp" dev="vda1" ino=4215739 scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1565607649.040:874): avc:  denied  { add_name } for  pid=22946 comm="auditd" name="auditd_0" scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1565607649.040:874): avc:  denied  { create } for  pid=22946 comm="auditd" name="auditd_0" scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file permissive=1
type=SYSCALL msg=audit(1565607649.040:874): arch=c000003e syscall=257 success=yes exit=14 a0=ffffff9c a1=56243313ed00 a2=2c1 a3=180 items=0 ppid=22945 pid=22946 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="auditd" exe="/usr/sbin/auditd" subj=system_u:system_r:auditd_t:s0 key=(null)ARCH=x86_64 SYSCALL=openat AUID="unset" UID="root" GID="root" EUID="root" SUID="root" FSUID="root" EGID="root" SGID="root" FSGID="root"
type=PROCTITLE msg=audit(1565607649.040:874): proctitle="/sbin/auditd"

# ausearch -ts recent -m AVC -r | audit2allow

#============= auditd_t ==============
allow auditd_t tmp_t:dir { add_name write };
allow auditd_t tmp_t:file create;

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

selinux-policy-3.14.3-13.el8

How reproducible:

100%

Steps to Reproduce:

1. Execute TC#553604 - /CoreOS/audit/Sanity/audisp-au-remote-plugin 
2. See "Using Kerberos" phase.

Actual results:

auditd cannot be started on remote logging server using KRB5 peer authentication

Expected results:

auditd can be started

Additional info:

Comment 2 Lukas Vrabec 2019-08-12 12:19:26 UTC
commit 4bb7d1c3ab0445804e1c822e971e052466acc772 (HEAD -> rhel8.1-base)
Author: Lukas Vrabec <lvrabec>
Date:   Mon Aug 12 14:17:12 2019 +0200

    Allow auditd_t domain to create auditd_tmp_t temporary files and dirs in /tmp or /var/tmp
    Resolves: rhbz#1740146

Comment 25 errata-xmlrpc 2019-11-05 22:12:10 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-2019:3547