Bug 1514591

Summary: Restarting ipmievd service results in avc denied errors.
Product: Red Hat Enterprise Linux 7 Reporter: Rachel Sibley <rasibley>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: lvrabec, mgrepl, mmalik, plautrba, rasibley, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-203.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:01:27 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 Rachel Sibley 2017-11-17 20:18:41 UTC
Description of problem:
Restarting the ipmievd service results in avc denied errors.

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

How reproducible:
Always

Steps to Reproduce:
1. yum install ipmitool
2. systemctl restart ipmievd
3. /sbin/ausearch -m AVC -m SELINUX_ERR | grep ipmievd

Actual results:
type=SYSCALL msg=audit(1510963531.701:72): arch=c000003e syscall=2 success=no exit=-13 a0=7f0f7aa4d622 a1=0 a2=1b6 a3=21000 items=0 ppi)
type=AVC msg=audit(1510963531.701:72): avc:  denied  { search } for  pid=12830 comm="ipmievd" name="pki" dev="dm-0" ino=33611406 sconter

Expected results:
No avc denied errors

Additional info:
[root@dell-pet710-01 ~]#  ls -Z /dev/ipmi0
crw-------. root root system_u:object_r:ipmi_device_t:s0 /dev/ipmi0
[root@dell-pet710-01 ~]# uname -r
3.10.0-768.el7.x86_64

Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1349058

Comment 2 Milos Malik 2017-11-19 18:46:06 UTC
SELinux denial mentioned in comment#0 is not complete. Parts like scontext, tcontext and tclass are missing. Please run following command and attach the output to this bug:

# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -c ipmievd

Comment 3 Rachel Sibley 2017-11-27 20:22:30 UTC
Hi Milos, additional info provided below:

~]# ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -c ipmievd
----
type=PROCTITLE msg=audit(11/27/2017 20:20:18.851:110) : proctitle=/usr/sbin/ipmievd sel daemon pidfile=/var/run/ipmievd.pid 
type=SYSCALL msg=audit(11/27/2017 20:20:18.851:110) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7f0bc3b7d622 a1=O_RDONLY a2=0x1b6 a3=0x21000 items=0 ppid=1 pid=3395 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=ipmievd exe=/usr/sbin/ipmievd subj=system_u:system_r:ipmievd_t:s0 key=(null) 
type=AVC msg=audit(11/27/2017 20:20:18.851:110) : avc:  denied  { search } for  pid=3395 comm=ipmievd name=pki dev="dm-0" ino=33611406 scontext=system_u:system_r:ipmievd_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=dir 
----
type=PROCTITLE msg=audit(11/27/2017 20:21:17.225:113) : proctitle=/usr/sbin/ipmievd sel daemon pidfile=/var/run/ipmievd.pid 
type=SYSCALL msg=audit(11/27/2017 20:21:17.225:113) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x7fd60e382622 a1=O_RDONLY a2=0x1b6 a3=0x21000 items=0 ppid=1 pid=9167 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=ipmievd exe=/usr/sbin/ipmievd subj=system_u:system_r:ipmievd_t:s0 key=(null) 
type=AVC msg=audit(11/27/2017 20:21:17.225:113) : avc:  denied  { search } for  pid=9167 comm=ipmievd name=pki dev="dm-0" ino=33611406 scontext=system_u:system_r:ipmievd_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=dir

Comment 9 errata-xmlrpc 2018-10-30 10:01:27 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