Bug 1954621 - SELinux is preventing freshclam from 'getattr' accesses on the filesystem /sys/fs/cgroup.
Summary: SELinux is preventing freshclam from 'getattr' accesses on the filesystem /sy...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 34
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:59ef5fa4b54ee2f3be831e40b5b...
: 1956804 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-28 13:22 UTC by dan
Modified: 2021-05-07 01:03 UTC (History)
11 users (show)

Fixed In Version: selinux-policy-34.5-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-07 01:03:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description dan 2021-04-28 13:22:23 UTC
Description of problem:
SELinux is preventing freshclam from 'getattr' accesses on the filesystem /sys/fs/cgroup.

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

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

Additional Information:
Source Context                system_u:system_r:antivirus_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup [ filesystem ]
Source                        freshclam
Source Path                   freshclam
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-34.3-1.fc34.noarch
Local Policy RPM              selinux-policy-targeted-34.3-1.fc34.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.11.15-300.fc34.x86_64 #1 SMP Fri
                              Apr 16 13:41:48 UTC 2021 x86_64 x86_64
Alert Count                   1
First Seen                    2021-04-28 08:30:01 EDT
Last Seen                     2021-04-28 08:30:01 EDT
Local ID                      91fa1c81-a074-4513-8ad2-34b7788cccc9

Raw Audit Messages
type=AVC msg=audit(1619613001.352:4492): avc:  denied  { getattr } for  pid=1387 comm="freshclam" name="/" dev="cgroup2" ino=1 scontext=system_u:system_r:antivirus_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=filesystem permissive=0


Hash: freshclam,antivirus_t,cgroup_t,filesystem,getattr

Version-Release number of selected component:
selinux-policy-targeted-34.3-1.fc34.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.11.15-300.fc34.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2021-04-28 14:56:10 UTC
I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy/pull/708

Comment 2 John Dodson 2021-05-04 12:59:13 UTC
*** Bug 1956804 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2021-05-05 14:48:08 UTC
FEDORA-2021-b9564e597a has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b9564e597a

Comment 4 Fedora Update System 2021-05-06 01:58:14 UTC
FEDORA-2021-b9564e597a has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b9564e597a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b9564e597a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-05-07 01:03:01 UTC
FEDORA-2021-b9564e597a has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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