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 1983268 - SELinux is preventing /usr/bin/systemctl from getattr access on the filesystem /.
Summary: SELinux is preventing /usr/bin/systemctl from getattr access on the filesyste...
Keywords:
Status: CLOSED DUPLICATE of bug 1979182
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: CentOS Stream
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: beta
: 8.5
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-17 05:52 UTC by Phil Baker
Modified: 2021-10-07 18:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-30 12:06:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Cockpit log entry (982 bytes, text/plain)
2021-07-17 05:52 UTC, Phil Baker
no flags Details
ausearch_output (2.06 KB, text/plain)
2021-07-30 12:00 UTC, kellerbe1
no flags Details

Description Phil Baker 2021-07-17 05:52:32 UTC
Created attachment 1802606 [details]
Cockpit log entry

Description of problem:
SELinux is preventing /usr/bin/systemctl from getattr access on the filesystem /. The timestamp of the log in Cockpit corresponds to the boot time on my system. 

Version-Release number of selected component (if applicable):
CentOS Stream 8
selinux-policy-3.14.3-72.el8.noarch

How reproducible:
Always

Steps to Reproduce:
1.Boot system
2.Log into Cockpit
3.Check Logs

Additional info:
In my limited observation, this error appears confined to boot time,

Comment 1 Milos Malik 2021-07-22 11:33:44 UTC
We would like to see the detailed SELinux denials.

Please run the following command on the machine where the cockpit issues appear.

# ausearch -m avc -m user_avc -m selinux_err -i -ts today

Please attach the output of the command to this bug.

Thank you.

Comment 2 kellerbe1 2021-07-30 12:00:41 UTC
Created attachment 1809388 [details]
ausearch_output

Comment 3 Zdenek Pytela 2021-07-30 12:06:22 UTC
Thank you for the ausearch command output, it matches bz#1979182, so we will continue there.

*** This bug has been marked as a duplicate of bug 1979182 ***

Comment 4 Phil Baker 2021-07-30 14:05:03 UTC
Here's the output: 

[root@c2 pbaker]# ausearch -m avc -m user_avc -m selinux_err -i -ts today
----
type=PROCTITLE msg=audit(07/30/2021 13:59:51.174:11) : proctitle=systemctl show --property Listen cockpit.socket 
type=SYSCALL msg=audit(07/30/2021 13:59:51.174:11) : arch=x86_64 syscall=fstatfs success=no exit=EACCES(Permission denied) a0=0x3 a1=0x7ffc9b0e1c10 a2=0x280100 a3=0x0 items=0 ppid=888 pid=889 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemctl exe=/usr/bin/systemctl subj=system_u:system_r:cockpit_ws_t:s0 key=(null) 
type=AVC msg=audit(07/30/2021 13:59:51.174:11) : avc:  denied  { getattr } for  pid=889 comm=systemctl name=/ dev="dm-0" ino=128 scontext=system_u:system_r:cockpit_ws_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem permissive=0 
----
type=PROCTITLE msg=audit(07/30/2021 13:59:51.562:31) : proctitle=systemctl show --property Listen cockpit.socket 
type=SYSCALL msg=audit(07/30/2021 13:59:51.562:31) : arch=x86_64 syscall=fstatfs success=no exit=EACCES(Permission denied) a0=0x3 a1=0x7ffd2b79cdf0 a2=0x280100 a3=0x0 items=0 ppid=1177 pid=1180 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemctl exe=/usr/bin/systemctl subj=system_u:system_r:cockpit_ws_t:s0 key=(null) 
type=AVC msg=audit(07/30/2021 13:59:51.562:31) : avc:  denied  { getattr } for  pid=1180 comm=systemctl name=/ dev="dm-0" ino=128 scontext=system_u:system_r:cockpit_ws_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem permissive=0


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