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 2144501 - SELinux is preventing systemctl from getattr access on the filesystem /.
Summary: SELinux is preventing systemctl from getattr access on the filesystem /.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.7
Hardware: All
OS: Linux
medium
high
Target Milestone: rc
: 8.8
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
: 2159019 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-21 13:52 UTC by Brian J. Murrell
Modified: 2023-05-16 11:03 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.14.3-112.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 09:04:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1477 0 None open Allow the spamd_update_t domain get generic filesystem attributes 2022-11-24 12:26:04 UTC
Red Hat Issue Tracker RHELPLAN-140026 0 None None None 2022-11-21 14:19:54 UTC
Red Hat Product Errata RHBA-2023:2965 0 None None None 2023-05-16 09:04:37 UTC

Description Brian J. Murrell 2022-11-21 13:52:53 UTC
SELinux is preventing systemctl from getattr access on the filesystem /.

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

If you believe that systemctl should be allowed getattr access on the  filesystem 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 'systemctl' --raw | audit2allow -M my-systemctl
# semodule -X 300 -i my-systemctl.pp


Additional Information:
Source Context                system_u:system_r:spamd_update_t:s0
Target Context                system_u:object_r:fs_t:s0
Target Objects                / [ filesystem ]
Source                        systemctl
Source Path                   systemctl
Port                          <Unknown>
Host                          server.interlinx.bc.ca
Source RPM Packages           
Target RPM Packages           filesystem-3.8-6.el8.x86_64
SELinux Policy RPM            selinux-policy-targeted-3.14.3-108.el8.noarch
Local Policy RPM              selinux-policy-targeted-3.14.3-108.el8.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     server.interlinx.bc.ca
Platform                      Linux server.interlinx.bc.ca
                              4.18.0-372.32.1.el8_6.x86_64 #1 SMP Tue Oct 25
                              05:53:57 EDT 2022 x86_64 x86_64
Alert Count                   6
First Seen                    2022-11-19 00:33:37 EST
Last Seen                     2022-11-21 01:45:15 EST
Local ID                      7a355dbb-e393-41b1-b0ee-3b1c65801892

Raw Audit Messages
type=AVC msg=audit(1669013115.838:10938): avc:  denied  { getattr } for  pid=613568 comm="systemctl" name="/" dev="dm-4" ino=2 scontext=system_u:system_r:spamd_update_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem permissive=0


Hash: systemctl,spamd_update_t,fs_t,filesystem,getattr

Comment 1 Milos Malik 2022-11-21 15:23:21 UTC
One of our automated tests finds the SELinux denial as well:
----
type=PROCTITLE msg=audit(10/24/2022 19:27:35.904:3855) : proctitle=systemctl condrestart spamassassin.service 
type=SYSCALL msg=audit(10/24/2022 19:27:35.904:3855) : arch=aarch64 syscall=fstatfs success=no exit=EACCES(Permission denied) a0=0x3 a1=0xffffff1981b0 a2=0xffffa64ffb88 a3=0x0 items=0 ppid=584811 pid=585375 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:spamd_update_t:s0 key=(null) 
type=AVC msg=audit(10/24/2022 19:27:35.904:3855) : avc:  denied  { getattr } for  pid=585375 comm=systemctl name=/ dev="dm-0" ino=128 scontext=system_u:system_r:spamd_update_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem permissive=0 
----

Comment 4 Zdenek Pytela 2022-11-28 14:15:49 UTC
To backport:
commit 5cfc3f33e3dec62c6c9417166211b432c4225035 (HEAD -> rawhide, upstream/rawhide)
Author: Zdenek Pytela <zpytela>
Date:   Thu Nov 24 13:22:52 2022 +0100

    Allow the spamd_update_t domain get generic filesystem attributes

Comment 16 Zdenek Pytela 2023-01-09 14:33:13 UTC
*** Bug 2159019 has been marked as a duplicate of this bug. ***

Comment 18 Brian J. Murrell 2023-05-03 15:08:14 UTC
selinux-policy-3.14.3-112.el8 sure has been a long time in coming.  Why does it take over 4 months for it to be released?

Comment 19 Brian J. Murrell 2023-05-03 15:09:06 UTC
I'm just noticing "Target Release: 8.8".  Is this really the sort of thing that can only happen on a minor update cadence?

Comment 20 Zdenek Pytela 2023-05-03 18:46:03 UTC
(In reply to Brian J. Murrell from comment #19)
> I'm just noticing "Target Release: 8.8".  Is this really the sort of thing
> that can only happen on a minor update cadence?

Every RHEL bz follows the workflow which delivers the resolved bzs in the future active minor release [1]. Backport can be requested via the regular Red Hat support channels. Additionally, centos stream can be used as the packages source repository.

[1] How am I supported on a specific RHEL release?
    https://access.redhat.com/articles/64664

Comment 21 Brian J. Murrell 2023-05-03 19:02:56 UTC
But we do see updates on a much more frequent basis than just minor point releases.  Almost daily but most certainly at least weekly.

How does that happen when this one has to wait for a minor point release update?

Comment 23 errata-xmlrpc 2023-05-16 09:04:17 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 (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-2023:2965


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