RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1720639 - SELinux is preventing /usr/libexec/platform-python3.6 from open access on the file /var/log/hawkey.log.
Summary: SELinux is preventing /usr/libexec/platform-python3.6 from open access on the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 8.1
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
: 1738246 1744300 (view as bug list)
Depends On:
Blocks: 1750546
TreeView+ depends on / blocked
 
Reported: 2019-06-14 12:18 UTC by Martin Krajnak
Modified: 2024-06-13 22:08 UTC (History)
16 users (show)

Fixed In Version: selinux-policy-3.14.3-20.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:11:44 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3547 0 None None None 2019-11-05 22:12:01 UTC

Internal Links: 1949871

Description Martin Krajnak 2019-06-14 12:18:47 UTC
SELinux is preventing /usr/libexec/platform-python3.6 from open access on the file /var/log/hawkey.log.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that platform-python3.6 should be allowed open access on the hawkey.log file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'rhsmcertd-worke' --raw | audit2allow -M my-rhsmcertdworke
# semodule -X 300 -i my-rhsmcertdworke.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                unconfined_u:object_r:var_log_t:s0
Target Objects                /var/log/hawkey.log [ file ]
Source                        rhsmcertd-worke
Source Path                   /usr/libexec/platform-python3.6
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           platform-python-3.6.8-11.el8.x86_64
Target RPM Packages           dnf-data-4.2.6-1.el8.noarch
Policy RPM                    selinux-policy-3.14.3-8.el8.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 4.18.0-103.el8.x86_64
                              #1 SMP Sat Jun 8 15:07:32 UTC 2019 x86_64 x86_64
Alert Count                   23
First Seen                    2019-04-05 14:49:37 CEST
Last Seen                     2019-06-14 14:09:44 CEST
Local ID                      279f5906-2017-442a-af0f-0ac0d2ab8ae9

Raw Audit Messages
type=AVC msg=audit(1560514184.520:155): avc:  denied  { open } for  pid=11744 comm="rhsmcertd-worke" path="/var/log/hawkey.log" dev="nvme0n1p2" ino=655773 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1560514184.520:155): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffff9c a1=561037472800 a2=441 a3=1b6 items=0 ppid=1436 pid=11744 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rhsmcertd-worke exe=/usr/libexec/platform-python3.6 subj=system_u:system_r:rhsmcertd_t:s0 key=(null)

Hash: rhsmcertd-worke,rhsmcertd_t,var_log_t,file,open

Comment 5 Lukas Vrabec 2019-08-26 15:19:36 UTC
*** Bug 1744300 has been marked as a duplicate of this bug. ***

Comment 8 Lukas Vrabec 2019-09-15 09:11:52 UTC
*** Bug 1738246 has been marked as a duplicate of this bug. ***

Comment 16 Martin Pitt 2019-09-21 11:07:55 UTC
Apparently this caused a regression: bug 1753991

Comment 18 errata-xmlrpc 2019-11-05 22:11:44 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-2019:3547

Comment 19 yuk 2021-04-14 14:25:03 UTC
This bug is still alive in RHEL 8.3


SELinux is preventing /usr/libexec/platform-python3.6 from add_name access on the directory /var/log/hawkey.log.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that platform-python3.6 should be allowed add_name access on the hawkey.log directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'rhsmcertd-worke' --raw | audit2allow -M my-rhsmcertdworke # semodule -X 300 -i my-rhsmcertdworke.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log/hawkey.log [ dir ]
Source                        rhsmcertd-worke
Source Path                   /usr/libexec/platform-python3.6
Port                          <Unknown>
Host                          rhel83srv.intra.local
Source RPM Packages           platform-python-3.6.8-31.el8.x86_64
Target RPM Packages           dnf-data-4.2.23-4.el8.noarch
SELinux Policy RPM            selinux-policy-targeted-3.14.3-54.el8_3.2.noarch
Local Policy RPM              selinux-policy-targeted-3.14.3-54.el8_3.2.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     rhel83srv.intra.local
Platform                      Linux rhel83srv.intra.local
                              4.18.0-240.10.1.el8_3.x86_64 #1 SMP Wed Dec 16
                              03:30:52 EST 2020 x86_64 x86_64
Alert Count                   188
First Seen                    2021-02-10 14:14:36 CET
Last Seen                     2021-04-14 15:36:47 CEST
Local ID                      967804a1-d067-4ca4-a4c5-4ea1fbc50af3

Raw Audit Messages
type=AVC msg=audit(1618407407.575:2775337): avc:  denied  { add_name } for  pid=1306156 comm="rhsmcertd-worke" name="hawkey.log" scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=1


type=AVC msg=audit(1618407407.575:2775337): avc:  denied  { create } for  pid=1306156 comm="rhsmcertd-worke" name="hawkey.log" scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1618407407.575:2775337): arch=x86_64 syscall=openat success=yes exit=ENXIO a0=ffffff9c a1=56443e66e1d0 a2=441 a3=1b6 items=2 ppid=1137 pid=1306156 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rhsmcertd-worke exe=/usr/libexec/platform-python3.6 subj=system_u:system_r:rhsmcertd_t:s0 key=(null)

type=CWD msg=audit(1618407407.575:2775337): cwd=/

type=PATH msg=audit(1618407407.575:2775337): item=0 name=/var/log/ inode=134 dev=fd:03 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:var_log_t:s0 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

type=PATH msg=audit(1618407407.575:2775337): item=1 name=/var/log/hawkey.log inode=409 dev=fd:03 mode=0100600 ouid=0 ogid=0 rdev=00:00 obj=unconfined_u:object_r:rpm_log_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0

Hash: rhsmcertd-worke,rhsmcertd_t,var_log_t,dir,add_name

Comment 20 yuk 2021-04-14 14:38:40 UTC
shouldn't it be reopened?

Comment 22 John 2022-07-28 06:02:50 UTC
"Apparently this caused a regression: bug 1753991"

Red Hat Enterprise Linux IS a regression.
Just pathetic.

Comment 23 John 2022-07-28 06:36:32 UTC
Still present in fully updated EL8.6

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
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. For complete SELinux messages run: sealert -l df629178-ec07-4330-a238-631125365194
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 16:30:50 ~]# rpm -q selinux-policy
selinux-policy-3.14.3-95.el8.noarch

Absolutely truly astoundingly pathetic.


Red Hat Insights is supposed to highlight and reveal issues on Red Hat Enterprise Linux systems am i right?

So instead all it does is spam logs with selinux false alarms, thus hiding other real issues which may be present.


Truly BRILLIANT work Red Hat.
Superb own goal, shoot self in foot, stab eye with fork, however you want to put it.

I've been using Red Hat systems for 20 years now, but you guys never cease to amaze me.

Comment 24 John 2022-07-29 05:06:22 UTC
Sorry, my earlier comment implied insights-client was responsible for the hawkey.log accesses, but no, the insights-client is giving me problems with other files.

the hawkey.log is being accessed y rhsmcertd-worker, as mentioned earlier in this bugreport.

And FYI my rhsmcertd-worker also getting read, open, getattr and ioctl denied on /etc/insights-client/machine-id

Jul 27 18:19:31 audctstmr002 setroubleshoot[2713]: SELinux is preventing rhsmcertd-worke from read access on the file /etc/insights-client/machine-id.#012#012*****  Plugin catchall (100. confidence) suggests   **************************#012#012If you believe that rhsmcertd-worke should be allowed read access on the machine-id 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 'rhsmcertd-worke' --raw | audit2allow -M my-rhsmcertdworke#012# semodule -X 300 -i my-rhsmcertdworke.pp#012
Jul 27 18:19:33 audctstmr002 setroubleshoot[2713]: SELinux is preventing rhsmcertd-worke from open access on the file /etc/insights-client/machine-id. For complete SELinux messages run: sealert -l b49342c2-322f-49b0-b25d-ed748d8b96c7
Jul 27 18:19:33 audctstmr002 setroubleshoot[2713]: SELinux is preventing rhsmcertd-worke from open access on the file /etc/insights-client/machine-id.#012#012*****  Plugin catchall (100. confidence) suggests   **************************#012#012If you believe that rhsmcertd-worke should be allowed open access on the machine-id 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 'rhsmcertd-worke' --raw | audit2allow -M my-rhsmcertdworke#012# semodule -X 300 -i my-rhsmcertdworke.pp#012
Jul 27 18:19:47 audctstmr002 setroubleshoot[2738]: SELinux is preventing rhsmcertd-worke from getattr access on the file /etc/insights-client/machine-id. For complete SELinux messages run: sealert -l 991c8d66-6dd5-45b5-bd81-4b8d9b431481
Jul 27 18:19:47 audctstmr002 setroubleshoot[2738]: SELinux is preventing rhsmcertd-worke from getattr access on the file /etc/insights-client/machine-id.#012#012*****  Plugin catchall (100. confidence) suggests   **************************#012#012If you believe that rhsmcertd-worke should be allowed getattr access on the machine-id 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 'rhsmcertd-worke' --raw | audit2allow -M my-rhsmcertdworke#012# semodule -X 300 -i my-rhsmcertdworke.pp#012
Jul 27 18:20:01 audctstmr002 setroubleshoot[2755]: SELinux is preventing rhsmcertd-worke from ioctl access on the file /etc/insights-client/machine-id. 


These Red Hat "tools" are just utterly useless, if Red Hat cannot even get them to work properly and quietly under selinux.
It's just hopeless.

How Red Hat can fail to get their own tools working on their own OS, it just blows my mind.

Comment 25 Nikola Knazekova 2023-01-16 13:33:37 UTC
*** Bug 2159393 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.