Bug 1949871
Summary: | SELinux is preventing /usr/libexec/platform-python3.6 from add_name access on the directory /var/log/hawkey.log | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | dbodnarc |
Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.5 | CC: | abjoshi, fadamo, john.sincock, lvrabec, mmalik, plautrba, rmetrich, ssekidde, tscherf |
Target Milestone: | rc | Keywords: | AutoVerified, Triaged |
Target Release: | 8.6 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.14.3-90.el8 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-10 15:14:58 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
dbodnarc
2021-04-15 09:47:14 UTC
I've submitted a Fedora PR to address the issue: https://github.com/fedora-selinux/selinux-policy/pull/1045 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-2022:1995 OH, it's fixed in 3.14.3-95 is it? Jul 28 03:28:34 audccfots809 setroubleshoot[57764]: SELinux is preventing /usr/libexec/platform-python3.6 from read access on the file /var/log/hawkey.log.#012#012***** Plugin catchall (100. confidence) suggests **************************#012#012If you believe that platform-python3.6 should be allowed read access on the hawkey.log file by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'yum' --raw | audit2allow -M my-yum#012# semodule -X 300 -i my-yum.pp#012 [root@audccfots809 07-28 15:55:24 ~]# rpm -q selinux-policy selinux-policy-3.14.3-95.el8.noarch Hopeless. Hopeless. Hopeless. Hopeless. Hopeless. Hopeless. Hopeless. Maybe you want to have another try? Maybe get it properly fixed by the time RHEL 860 comes out, the year 6000 AD or so? Oh, and error on open access too: Jul 28 03:28:34 audccfots809 setroubleshoot[57764]: SELinux is preventing /usr/libexec/platform-python3.6 from open access on the file /var/log/hawkey.log.#012#012***** Plugin catchall (100. confidence) suggests **************************#012#012If you believe that platform-python3.6 should be allowed open access on the hawkey.log file by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'yum' --raw | audit2allow -M my-yum#012# semodule -X 300 -i my-yum.pp#012 Pitiful. Please run the following commands and let us know if the problem still persists: # ls -lZ /var/log/hawkey.log # restorecon -v /var/log/hawkey.log I assume that the /var/log/hawkey.log file is mislabeled (my guess is var_log_t). The restorecon command should correct the label to rpm_log_t. The important questions are which process created the incorrectly labeled /var/log/hawkey.log file and how the file was created. Was it created directly in /var/log directory or was it created elsewhere and then renamed? Nope. The file is labelled rpm_log_t Jul 29 02:22:01 audccfots809 setroubleshoot[121363]: SELinux is preventing /usr/libexec/platform-python3.6 from read access on the file /var/log/hawkey.log.#012#012***** Plugin catchall (100. confidence) suggests **************************#012#012If you believe that platform-python3.6 should be allowed read access on the hawkey.log file by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'yum' --raw | audit2allow -M my-yum#012# semodule -X 300 -i my-yum.pp#012 [root@audccfots809 07-29 10:43:29 ~]# ls -lZ /var/log/hawkey.log -rw-------. 1 root root system_u:object_r:rpm_log_t:s0 5940 Jul 29 10:03 /var/log/hawkey.log [root@audccfots809 07-29 10:43:34 ~]# restorecon -v /var/log/hawkey.log [root@audccfots809 07-29 10:43:46 ~]# Also, there are multiple hawkey logs, so they are being created via the normal process, and rotating like normal: -rw-------. 1 root root system_u:object_r:rpm_log_t:s0 5940 Jul 29 10:03 hawkey.log -rw-------. 1 root root system_u:object_r:rpm_log_t:s0 6360 Jul 3 02:39 hawkey.log-20220703 -rw-------. 1 root root system_u:object_r:rpm_log_t:s0 6420 Jul 10 02:22 hawkey.log-20220710 -rw-------. 1 root root system_u:object_r:rpm_log_t:s0 6780 Jul 17 01:49 hawkey.log-20220717 -rw-------. 1 root root system_u:object_r:rpm_log_t:s0 6540 Jul 24 02:47 hawkey.log-20220724 And yet i still have these nonsense warnings spamming my logs. Fully updated vm(s), with: [root@audccfots809 07-29 11:27:52 ~]# rpm -q selinux-policy selinux-policy-3.14.3-95.el8.noarch |