Bug 1378164

Summary: spamassassin triggers selinux alert
Product: [Fedora] Fedora Reporter: dan
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 25CC: dominick.grift, dwalsh, jjelen, kevin, lvrabec, mgrepl, nb, plautrba, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-225.3.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-12 23:58:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description dan 2016-09-21 17:01:10 UTC
Description of problem:

When scanning an email, spamassassin triggers the the following selinux alert:

Sep 21 12:50:54 xxxx.private setroubleshoot[18368]: failed to retrieve rpm info for /var/spool/spamassassin/.razor/identity
Sep 21 12:50:54 xxxx.private setroubleshoot[18368]: SELinux is preventing 7370616D64206368696C64 from getattr access on the lnk_file /var/spool/spamassassin/.razor/identity. For complete SELinux messages. run sealert -l 5db50b01-fc3b-430b-828a-b2a561ce3e33
Sep 21 12:50:54 xxxx.private python3[18368]: SELinux is preventing 7370616D64206368696C64 from getattr access on the lnk_file /var/spool/spamassassin/.razor/identity.
                                             
                                             *****  Plugin catchall (100. confidence) suggests   **************************
                                             
                                             If you believe that 7370616D64206368696C64 should be allowed getattr access on the identity lnk_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 '7370616D64206368696C64' --raw | audit2allow -M my-7370616D64206368696C64
                                             # semodule -X 300 -i my-7370616D64206368696C64.pp
                                             

However the recommended course of action finds "Nothing to do".

Version-Release number of selected component (if applicable):

spamassassin-3.4.1-9.fc24.x86_64


How reproducible:

This occurs on every email processed.

Comment 1 Kevin Fenzi 2016-09-25 00:19:43 UTC
Yeah, this is fallout from adding a dep on perl-Razor-Agent... 

Hopefully we can adjust policy to allow this. :) 

Moving to selinux-policy for comment.

Comment 2 Fedora Admin XMLRPC Client 2016-09-27 15:12:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 dan 2016-11-05 00:47:32 UTC
Any way we can move this forward?  I am willing to provide any additional info required.

Comment 4 Lukas Vrabec 2016-11-07 19:32:56 UTC
Dan, 
Could you reproduce this issue and then attach raw AVC msgs? 

Steps: 
1. reproduce issue
2. # ausearch -m AVC,USER_AVC -ts recent 

Thanks.

Comment 5 dan 2016-11-07 20:43:39 UTC
time->Mon Nov  7 15:41:36 2016
type=AVC msg=audit(1478551296.828:5773): avc:  denied  { getattr } for  pid=3173 comm="spamd" path="/var/spool/spamassassin/.razor/identity" dev="dm-0" ino=7471138 scontext=system_u:system_r:spamd_t:s0 tcontext=unconfined_u:object_r:spamd_spool_t:s0 tclass=lnk_file permissive=0

Comment 6 dan 2016-11-07 20:46:39 UTC
Here's another, slightly different string for comm=

time->Mon Nov  7 15:43:52 2016
type=AVC msg=audit(1478551432.066:5774): avc:  denied  { getattr } for  pid=3182 comm=7370616D64206368696C64 path="/var/spool/spamassassin/.razor/identity" dev="dm-0" ino=7471138 scontext=system_u:system_r:spamd_t:s0 tcontext=unconfined_u:object_r:spamd_spool_t:s0 tclass=lnk_file permissive=0

Comment 7 dan 2016-12-06 19:47:16 UTC
Exists in FC25.

Comment 8 dan 2016-12-07 13:56:06 UTC
Identity was symlink to actual identity-something file...removed symlink, now working with policy 3.13.1-225.1.

Comment 9 Fedora Update System 2016-12-09 13:46:47 UTC
selinux-policy-3.13.1-225.3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f24b3ddc6a

Comment 10 Fedora Update System 2016-12-10 03:57:59 UTC
selinux-policy-3.13.1-225.3.fc25 has been pushed to the Fedora 25 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-2016-f24b3ddc6a

Comment 11 Fedora Update System 2016-12-12 23:58:23 UTC
selinux-policy-3.13.1-225.3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.