Bug 1671019
| Summary: | Selinux AVC for /var/run/faillock/ | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | philippe Maupertuis <philippe.maupertuis> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.1 | CC: | jjaburek, lvrabec, mmalik, philippe.maupertuis, plautrba, ssekidde, zpytela |
| Target Milestone: | rc | Keywords: | Patch |
| Target Release: | 8.2 | Flags: | 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: | Environment: | ||
| Last Closed: | 2020-04-28 16:40:34 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: | 1673107, 1682526 | ||
| Bug Blocks: | |||
|
Description
philippe Maupertuis
2019-01-30 15:05:35 UTC
Please attach SELinux denials which appeared on your machine: # ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i -ts today Thank you. Please find below the result of the command:
ausearch -m avc -m user_avc -m selinux_err -m user_selinux_err -i
----
type=PROCTITLE msg=audit(01/25/2019 23:16:07.157:347) : proctitle=(systemd)
type=PATH msg=audit(01/25/2019 23:16:07.157:347) : item=0 name=/var/run/faillock/ inode=24723 dev=00:17 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:faillog_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(01/25/2019 23:16:07.157:347) : cwd=/
type=SYSCALL msg=audit(01/25/2019 23:16:07.157:347) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x5626afa30f50 a2=O_RDWR|O_CREAT a3=0x180 items=1 ppid=1 pid=1988 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(systemd) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=logins
type=AVC msg=audit(01/25/2019 23:16:07.157:347) : avc: denied { write } for pid=1988 comm=(systemd) name=faillock dev="tmpfs" ino=24723 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:faillog_t:s0 tclass=dir permissive=0
----
type=PROCTITLE msg=audit(01/26/2019 00:39:07.829:283) : proctitle=(systemd)
type=PATH msg=audit(01/26/2019 00:39:07.829:283) : item=0 name=/var/run/faillock/ inode=24326 dev=00:17 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:faillog_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(01/26/2019 00:39:07.829:283) : cwd=/
type=SYSCALL msg=audit(01/26/2019 00:39:07.829:283) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x5617a91fce20 a2=O_RDWR|O_CREAT a3=0x180 items=1 ppid=1 pid=1166 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(systemd) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=logins
type=AVC msg=audit(01/26/2019 00:39:07.829:283) : avc: denied { write } for pid=1166 comm=(systemd) name=faillock dev="tmpfs" ino=24326 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:faillog_t:s0 tclass=dir permissive=0
----
type=PROCTITLE msg=audit(01/29/2019 13:38:31.856:299) : proctitle=(systemd)
type=PATH msg=audit(01/29/2019 13:38:31.856:299) : item=0 name=/var/run/faillock/ inode=24359 dev=00:17 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:faillog_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(01/29/2019 13:38:31.856:299) : cwd=/
type=SYSCALL msg=audit(01/29/2019 13:38:31.856:299) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x5599122f1d60 a2=O_RDWR|O_CREAT a3=0x180 items=1 ppid=1 pid=1295 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(systemd) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=logins
type=AVC msg=audit(01/29/2019 13:38:31.856:299) : avc: denied { write } for pid=1295 comm=(systemd) name=faillock dev="tmpfs" ino=24359 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:faillog_t:s0 tclass=dir permissive=0
----
type=PROCTITLE msg=audit(01/29/2019 16:52:02.528:1190) : proctitle=/usr/libexec/cockpit-session localhost
type=PATH msg=audit(01/29/2019 16:52:02.528:1190) : item=0 name=/var/run/faillock/fr18358 inode=46444 dev=00:17 mode=file,600 ouid=fr18358 ogid=root rdev=00:00 obj=system_u:object_r:faillog_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(01/29/2019 16:52:02.528:1190) : cwd=/
type=SYSCALL msg=audit(01/29/2019 16:52:02.528:1190) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x557cf58824a0 a2=O_RDWR a3=0x0 items=1 ppid=5892 pid=5912 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=cockpit-session exe=/usr/libexec/cockpit-session subj=system_u:system_r:cockpit_session_t:s0 key=logins
type=AVC msg=audit(01/29/2019 16:52:02.528:1190) : avc: denied { dac_override } for pid=5912 comm=cockpit-session capability=dac_override scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:system_r:cockpit_session_t:s0 tclass=capability permissive=0
----
type=PROCTITLE msg=audit(01/29/2019 16:52:02.558:1192) : proctitle=/usr/libexec/cockpit-session localhost
type=PATH msg=audit(01/29/2019 16:52:02.558:1192) : item=0 name=/var/run/faillock/fr18358 inode=46444 dev=00:17 mode=file,600 ouid=fr18358 ogid=root rdev=00:00 obj=system_u:object_r:faillog_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(01/29/2019 16:52:02.558:1192) : cwd=/
type=SYSCALL msg=audit(01/29/2019 16:52:02.558:1192) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x557cf5885990 a2=O_RDWR a3=0x0 items=1 ppid=5892 pid=5912 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=cockpit-session exe=/usr/libexec/cockpit-session subj=system_u:system_r:cockpit_session_t:s0 key=logins
type=AVC msg=audit(01/29/2019 16:52:02.558:1192) : avc: denied { dac_override } for pid=5912 comm=cockpit-session capability=dac_override scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:system_r:cockpit_session_t:s0 tclass=capability permissive=0
----
In this audit record:
----
type=PROCTITLE msg=audit(01/29/2019 16:52:02.558:1192) : proctitle=/usr/libexec/cockpit-session localhost
type=PATH msg=audit(01/29/2019 16:52:02.558:1192) : item=0 name=/var/run/faillock/fr18358 inode=46444 dev=00:17 mode=file,600 ouid=fr18358 ogid=root rdev=00:00 obj=system_u:object_r:faillog_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(01/29/2019 16:52:02.558:1192) : cwd=/
type=SYSCALL msg=audit(01/29/2019 16:52:02.558:1192) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x557cf5885990 a2=O_RDWR a3=0x0 items=1 ppid=5892 pid=5912 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=cockpit-session exe=/usr/libexec/cockpit-session subj=system_u:system_r:cockpit_session_t:s0 key=logins
type=AVC msg=audit(01/29/2019 16:52:02.558:1192) : avc: denied { dac_override } for pid=5912 comm=cockpit-session capability=dac_override scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:system_r:cockpit_session_t:s0 tclass=capability permissive=0
----
it is reported the /var/run/faillock/fr18358 file is owned by user fr18358 and has mode 0600, but the cockpit session runs under user root. I suppose it should be fixed in faillog or cockpit. One of the options is mode 640 as the file's group is set to root.
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-2020:1773 |