Bug 1774092 - SELinux is preventing sa-update.cron from 'getattr' accesses on the file /usr/lib/systemd/system/amavisd.service.
Summary: SELinux is preventing sa-update.cron from 'getattr' accesses on the file /usr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 30
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:9e08419acb439ee9e6772eb2dae...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-19 14:30 UTC by John Griffiths
Modified: 2019-12-11 01:32 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.14.3-53.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-11 01:32:21 UTC
Type: ---


Attachments (Terms of Use)

Description John Griffiths 2019-11-19 14:30:20 UTC
Description of problem:
SELinux is preventing sa-update.cron from 'getattr' accesses on the file /usr/lib/systemd/system/amavisd.service.

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

If you believe that sa-update.cron should be allowed getattr access on the amavisd.service 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 'sa-update.cron' --raw | audit2allow -M my-saupdatecron
# semodule -X 300 -i my-saupdatecron.pp

Additional Information:
Source Context                system_u:system_r:spamd_update_t:s0
Target Context                system_u:object_r:systemd_unit_file_t:s0
Target Objects                /usr/lib/systemd/system/amavisd.service [ file ]
Source                        sa-update.cron
Source Path                   sa-update.cron
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           amavisd-new-2.11.1-3.fc30.noarch
Policy RPM                    selinux-policy-3.14.3-52.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.11-200.fc30.x86_64 #1 SMP Tue
                              Nov 12 19:25:25 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2019-11-19 00:41:34 EST
Last Seen                     2019-11-19 00:41:34 EST
Local ID                      932bebcf-28a4-4479-be84-598ce652a778

Raw Audit Messages
type=AVC msg=audit(1574142094.346:46168): avc:  denied  { getattr } for  pid=2873 comm="sa-update.cron" path="/usr/lib/systemd/system/amavisd.service" dev="dm-0" ino=5305619 scontext=system_u:system_r:spamd_update_t:s0 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file permissive=0


Hash: sa-update.cron,spamd_update_t,systemd_unit_file_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.14.3-52.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.3.11-200.fc30.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2019-11-19 15:56:09 UTC
A PR has been sent for a review:
https://github.com/fedora-selinux/selinux-policy-contrib/pull/168

Comment 2 Lukas Vrabec 2019-11-19 16:29:29 UTC
Hi Zdenek, 

In bugzilla you mentioned that PR has been sent for review but on github PR is in WIP [Work In Progress] state. I'm confused, what is real state? 

Thanks,
Lukas.

Comment 3 Zdenek Pytela 2019-11-20 10:17:41 UTC
It was switched back soon after the request, now it is ready.

Comment 4 Nicolas Berrehouc 2019-11-27 12:40:19 UTC
Same SELinux alert.

Comment 5 Ben Cotton 2019-11-27 14:17:13 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Ben Cotton 2019-11-27 14:55:30 UTC
This bug was accidentally closed due to a query error. Reopening.

Comment 7 Zdenek Pytela 2019-12-02 11:28:01 UTC
Clearing the needinfo flag as the PR has been completed.

Comment 8 Lukas Vrabec 2019-12-02 12:12:41 UTC
Backported to F30.

commit 512ed33db9ffa5f6e51afde6c129bf376461424a (HEAD -> rawhide, origin/rawhide, origin/HEAD)
Author: Zdenek Pytela <zpytela@redhat.com>
Date:   Fri Nov 15 11:09:39 2019 +0100

    Allow spamd_update_t access antivirus_unit_file_t BZ(1774092)
    
    Label /usr/lib/systemd/system/amavisd.service as antivirus_unit_file_t.
    Allow antivirus_systemctl(spamd_update_t).

Comment 9 Fedora Update System 2019-12-04 07:50:41 UTC
FEDORA-2019-e9d8868185 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e9d8868185

Comment 10 Fedora Update System 2019-12-05 02:01:01 UTC
selinux-policy-3.14.3-53.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-e9d8868185

Comment 11 Fedora Update System 2019-12-06 19:20:59 UTC
FEDORA-2019-e9d8868185 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e9d8868185

Comment 12 Fedora Update System 2019-12-07 02:18:04 UTC
container-selinux-2.123.0-2.fc30, selinux-policy-3.14.3-53.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-e9d8868185

Comment 13 Fedora Update System 2019-12-11 01:32:21 UTC
container-selinux-2.123.0-2.fc30, selinux-policy-3.14.3-53.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, 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.