Bug 1705331

Summary: SELinux is preventing (ate.cron) from 'execute' accesses on the file /usr/share/spamassassin/sa-update.cron.
Product: [Fedora] Fedora Reporter: dan
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 30CC: dwalsh, goeran, hugh, lvrabec, mgrepl, plautrba, ralph, stewart, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b6577df8a9ef846f6c5dcbb14ce7672c764c281093da166c0f1030c6c3829ee2;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.14.3-37.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-21 01:09:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dan 2019-05-02 04:15:25 UTC
Description of problem:
Noticed after upgrade from FC29 to FC30.
SELinux is preventing (ate.cron) from 'execute' accesses on the file /usr/share/spamassassin/sa-update.cron.

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

If you believe that (ate.cron) should be allowed execute access on the sa-update.cron 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 '(ate.cron)' --raw | audit2allow -M my-atecron
# semodule -X 300 -i my-atecron.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:spamd_update_exec_t:s0
Target Objects                /usr/share/spamassassin/sa-update.cron [ file ]
Source                        (ate.cron)
Source Path                   (ate.cron)
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           spamassassin-3.4.2-4.fc30.x86_64
Policy RPM                    selinux-policy-3.14.3-32.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.0.9-301.fc30.x86_64 #1 SMP Tue
                              Apr 23 23:57:35 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2019-05-02 00:00:01 EDT
Last Seen                     2019-05-02 00:00:01 EDT
Local ID                      4997ed5e-e935-4adc-a8cd-0a567bb29438

Raw Audit Messages
type=AVC msg=audit(1556769601.189:578): avc:  denied  { execute } for  pid=10370 comm="(ate.cron)" name="sa-update.cron" dev="dm-0" ino=136421 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:spamd_update_exec_t:s0 tclass=file permissive=0


Hash: (ate.cron),init_t,spamd_update_exec_t,file,execute

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         5.0.9-301.fc30.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2019-05-02 14:17:22 UTC
Hi,

Thank you for reporting the issue. It seems to be a result of the following change:

commit db6263430a37389d0e95add4ec8e86d69cea554f
Author: Lukas Vrabec <lvrabec>
Date:   Thu Dec 6 14:58:28 2018 +0100

    Label /usr/share/spamassassin/sa-update.cron as spamd_update_exec_t

so that a transition rule reflecting that is required, too.

Comment 2 Zdenek Pytela 2019-05-02 15:27:50 UTC
A pull request has been created to address the issue:

https://github.com/fedora-selinux/selinux-policy-contrib/pull/105

Comment 3 D. Hugh Redelmeier 2019-05-16 20:13:52 UTC
Description of problem:
spamassassin's cron entry upsets SELinux

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

Additional info:
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         5.0.16-300.fc30.x86_64
type:           libreport

Comment 4 Stewart Smith 2019-05-16 22:29:16 UTC
Description of problem:
Leave computer running overnight so cron jobs run

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

Additional info:
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         5.0.14-300.fc30.x86_64
type:           libreport

Comment 5 Fedora Update System 2019-05-18 11:03:26 UTC
selinux-policy-3.14.3-37.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-40c077f70d

Comment 6 Fedora Update System 2019-05-19 00:50:58 UTC
selinux-policy-3.14.3-37.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-40c077f70d

Comment 7 Fedora Update System 2019-05-21 01:09:30 UTC
selinux-policy-3.14.3-37.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.