Bug 1853389
| Summary: | fetchmail cannot remove stale /var/spool/mail/.fetchmail.pid file | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Milos Malik <mmalik> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.3 | CC: | anon.amish, grepl.miroslav, guilde.nt, lvrabec, mmalik, plautrba, ssekidde, vmojzis, zpytela |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.4 | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1840880 | Environment: | |
| Last Closed: | 2021-05-18 14:57:37 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
2020-07-02 14:35:39 UTC
The automated TC found following SELinux denials:
----
type=PROCTITLE msg=audit(11/12/2020 12:15:16.059:267) : proctitle=/usr/bin/fetchmail -d 300 --fetchmailrc /etc/fetchmailrc.example
type=PATH msg=audit(11/12/2020 12:15:16.059:267) : item=1 name=/var/spool/mail/.fetchmail.pid inode=33698504 dev=fd:00 mode=file,600 ouid=mail ogid=mail rdev=00:00 obj=system_u:object_r:mail_spool_t:s0 nametype=DELETE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(11/12/2020 12:15:16.059:267) : item=0 name=/var/spool/mail/ inode=33602346 dev=fd:00 mode=dir,775 ouid=root ogid=mail rdev=00:00 obj=system_u:object_r:mail_spool_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(11/12/2020 12:15:16.059:267) : cwd=/
type=SYSCALL msg=audit(11/12/2020 12:15:16.059:267) : arch=x86_64 syscall=unlink success=no exit=EACCES(Permission denied) a0=0x56493313d3b0 a1=0x23 a2=0x7f681c58b810 a3=0x56493211f198 items=2 ppid=1 pid=31809 auid=unset uid=mail gid=mail euid=mail suid=mail fsuid=mail egid=mail sgid=mail fsgid=mail tty=(none) ses=unset comm=fetchmail exe=/usr/bin/fetchmail subj=system_u:system_r:fetchmail_t:s0 key=(null)
type=AVC msg=audit(11/12/2020 12:15:16.059:267) : avc: denied { unlink } for pid=31809 comm=fetchmail name=.fetchmail.pid dev="dm-0" ino=33698504 scontext=system_u:system_r:fetchmail_t:s0 tcontext=system_u:object_r:mail_spool_t:s0 tclass=file permissive=0
----
type=PROCTITLE msg=audit(11/12/2020 12:15:16.059:268) : proctitle=/usr/bin/fetchmail -d 300 --fetchmailrc /etc/fetchmailrc.example
type=PATH msg=audit(11/12/2020 12:15:16.059:268) : item=0 name=/var/spool/mail/.fetchmail.pid inode=33698504 dev=fd:00 mode=file,600 ouid=mail ogid=mail rdev=00:00 obj=system_u:object_r:mail_spool_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(11/12/2020 12:15:16.059:268) : cwd=/
type=SYSCALL msg=audit(11/12/2020 12:15:16.059:268) : arch=x86_64 syscall=truncate success=no exit=EACCES(Permission denied) a0=0x56493313d3b0 a1=0x0 a2=0x7f681c58b810 a3=0x0 items=1 ppid=1 pid=31809 auid=unset uid=mail gid=mail euid=mail suid=mail fsuid=mail egid=mail sgid=mail fsgid=mail tty=(none) ses=unset comm=fetchmail exe=/usr/bin/fetchmail subj=system_u:system_r:fetchmail_t:s0 key=(null)
type=AVC msg=audit(11/12/2020 12:15:16.059:268) : avc: denied { write } for pid=31809 comm=fetchmail name=.fetchmail.pid dev="dm-0" ino=33698504 scontext=system_u:system_r:fetchmail_t:s0 tcontext=system_u:object_r:mail_spool_t:s0 tclass=file permissive=0
----
Above-mentioned SELinux denials are in fact consequences of this command: :: [ 12:15:14 ] :: [ BEGIN ] :: Running 'restorecon -Rv /run /var' Relabeled /var/spool/mail/.fetchmail.pid from system_u:object_r:fetchmail_uidl_cache_t:s0 to system_u:object_r:mail_spool_t:s0 :: [ 12:15:15 ] :: [ PASS ] :: Command 'restorecon -Rv /run /var' (Expected 0, got 0) I've submitted a Fedora PR to correct the previous fix: https://github.com/fedora-selinux/selinux-policy-contrib/pull/364 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 (selinux-policy bug fix and enhancement update), 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-2021:1639 |