Bug 1286030
Summary: | restorecon sets an incorrect label on /var/lock/LCK.. (created by apcupsd) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Milos Malik <mmalik> |
Component: | selinux-policy | Assignee: | Simon Sekidde <ssekidde> |
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.7 | CC: | dwalsh, lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.7.19-286.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-05-10 20:02:49 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
Milos Malik
2015-11-27 09:57:53 UTC
Ok we have /var/lock/subsys/apcupsd -- gen_context(system_u:object_r:apcupsd_lock_t,s0) /var/lock/LCK.. -- gen_context(system_u:object_r:apcupsd_lock_t,s0) labeling in RHEL-7. If SSSD is running and nsswitch.conf is configured in certain way then following AVC appears in enforcing mode: ---- type=PATH msg=audit(12/03/2015 11:18:45.061:61) : item=0 name=(null) inode=25543 dev=fc:03 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_var_lib_t:s0 nametype=NORMAL type=SOCKADDR msg=audit(12/03/2015 11:18:45.061:61) : saddr=local /var/lib/sss/pipes/nss type=SYSCALL msg=audit(12/03/2015 11:18:45.061:61) : arch=x86_64 syscall=connect success=no exit=-13(Permission denied) a0=0x3 a1=0x7ffd7b1cb550 a2=0x6e a3=0x7ffd7b1cb1e0 items=1 ppid=5697 pid=5708 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=tty sgid=tty fsgid=tty tty=(none) ses=1 comm=wall exe=/usr/bin/wall subj=unconfined_u:system_r:apcupsd_t:s0 key=(null) type=AVC msg=audit(12/03/2015 11:18:45.061:61) : avc: denied { search } for pid=5708 comm=wall name=sss dev=vda3 ino=25543 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir ---- The denial is usually accompanied by following messages in the terminal: # Broadcast message from root (Thu Dec 3 11:24:36 2015): Warning communications lost with UPS # Following AVCs appeared in permissive mode: ---- type=PATH msg=audit(12/03/2015 11:31:14.957:133) : item=0 name=/var/lib/sss/mc/passwd inode=437 dev=fc:03 mode=file,644 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_public_t:s0 nametype=NORMAL type=CWD msg=audit(12/03/2015 11:31:14.957:133) : cwd=/ type=SYSCALL msg=audit(12/03/2015 11:31:14.957:133) : arch=x86_64 syscall=open success=yes exit=3 a0=0x9822f0 a1=O_RDONLY|O_CLOEXEC a2=0x7ffc1816e12c a3=0x7ffc1816ddd0 items=1 ppid=10213 pid=10606 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=1 comm=apccontrol exe=/bin/bash subj=unconfined_u:system_r:apcupsd_t:s0 key=(null) type=AVC msg=audit(12/03/2015 11:31:14.957:133) : avc: denied { open } for pid=10606 comm=apccontrol name=passwd dev=vda3 ino=437 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file type=AVC msg=audit(12/03/2015 11:31:14.957:133) : avc: denied { read } for pid=10606 comm=apccontrol name=passwd dev=vda3 ino=437 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file type=AVC msg=audit(12/03/2015 11:31:14.957:133) : avc: denied { search } for pid=10606 comm=apccontrol name=mc dev=vda3 ino=25545 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=dir type=AVC msg=audit(12/03/2015 11:31:14.957:133) : avc: denied { search } for pid=10606 comm=apccontrol name=sss dev=vda3 ino=25543 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=dir ---- type=SYSCALL msg=audit(12/03/2015 11:31:14.961:134) : arch=x86_64 syscall=fstat success=yes exit=0 a0=0x3 a1=0x7ffc1816e090 a2=0x7ffc1816e090 a3=0x7ffc1816de00 items=0 ppid=10213 pid=10606 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=1 comm=apccontrol exe=/bin/bash subj=unconfined_u:system_r:apcupsd_t:s0 key=(null) type=AVC msg=audit(12/03/2015 11:31:14.961:134) : avc: denied { getattr } for pid=10606 comm=apccontrol path=/var/lib/sss/mc/passwd dev=vda3 ino=437 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:sssd_public_t:s0 tclass=file ---- type=PATH msg=audit(12/03/2015 11:31:14.961:135) : item=0 name=(null) inode=370 dev=fc:03 mode=socket,666 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_var_lib_t:s0 nametype=NORMAL type=SOCKADDR msg=audit(12/03/2015 11:31:14.961:135) : saddr=local /var/lib/sss/pipes/nss type=SYSCALL msg=audit(12/03/2015 11:31:14.961:135) : arch=x86_64 syscall=connect success=yes exit=0 a0=0x4 a1=0x7ffc1816e0f0 a2=0x6e a3=0x7ffc1816dd80 items=1 ppid=10213 pid=10606 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=1 comm=apccontrol exe=/bin/bash subj=unconfined_u:system_r:apcupsd_t:s0 key=(null) type=AVC msg=audit(12/03/2015 11:31:14.961:135) : avc: denied { connectto } for pid=10606 comm=apccontrol path=/var/lib/sss/pipes/nss scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:system_r:sssd_t:s0 tclass=unix_stream_socket type=AVC msg=audit(12/03/2015 11:31:14.961:135) : avc: denied { write } for pid=10606 comm=apccontrol name=nss dev=vda3 ino=370 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:sssd_var_lib_t:s0 tclass=sock_file ---- 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://rhn.redhat.com/errata/RHBA-2016-0763.html |