Bug 1590377

Summary: SELinux is preventing spamd from using the dac_override capability.
Product: [Fedora] Fedora Reporter: dan
Component: spamassassinAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, jjelen, jskarvad, kevin, lvrabec, mgrepl, nb, plautrba, pmoore, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spamassassin-3.4.1-20.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-07 22:52:36 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:
Embargoed:

Description dan 2018-06-12 14:13:35 UTC
SELinux is preventing spamd from using the 'dac_override' capabilities.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that spamd should have the dac_override capability 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 'spamd' --raw | audit2allow -M my-spamd
# semodule -X 300 -i my-spamd.pp

Additional Information:
Source Context                system_u:system_r:spamd_t:s0
Target Context                system_u:system_r:spamd_t:s0
Target Objects                Unknown [ capability ]
Source                        spamd
Source Path                   spamd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-32.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.14-300.fc28.x86_64 #1 SMP Tue
                              Jun 5 16:23:44 UTC 2018 x86_64 x86_64
Alert Count                   4
First Seen                    2018-06-10 10:24:49 EDT
Last Seen                     2018-06-12 00:52:22 EDT
Local ID                      6910e659-ab84-4de8-8ec5-87fa51bf4015

Raw Audit Messages
type=AVC msg=audit(1528779142.714:5790): avc:  denied  { dac_override } for  pid=12914 comm="spamd" capability=1  scontext=system_u:system_r:spamd_t:s0 tcontext=system_u:system_r:spamd_t:s0 tclass=capability permissive=0


Hash: spamd,spamd_t,spamd_t,capability,dac_override

Comment 1 dan 2018-07-02 17:29:12 UTC
Seems to occur when spamassassin.service starts or is restarted.

Comment 2 Lukas Vrabec 2018-07-03 09:22:48 UTC
Hi, 

This looks more like packaging issue than SELinux policy one. Moving to proper component.

For more info see:
https://lukas-vrabec.com/index.php/2018/07/03/why-do-you-see-dac_override-selinux-denials/

Comment 3 Jaroslav Škarvada 2018-07-03 13:04:49 UTC
IMHO it has been resolved in spamassassin-3.4.1-20, just merging it from the Rawhide and building it should be enough to resolve this problem.

Comment 4 Kevin Fenzi 2018-07-03 16:33:37 UTC
Yep. Can you build/submit the update? Or would you like me to?

Comment 5 Jaroslav Škarvada 2018-07-04 11:48:28 UTC
(In reply to Kevin Fenzi from comment #4)
> Yep. Can you build/submit the update? Or would you like me to?

OK, NP, I will do it.

Comment 6 Fedora Update System 2018-07-04 15:19:42 UTC
spamassassin-3.4.1-20.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-07cdeffc1e

Comment 7 Fedora Update System 2018-07-04 18:23:00 UTC
spamassassin-3.4.1-20.fc28 has been pushed to the Fedora 28 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-2018-07cdeffc1e

Comment 8 Fedora Update System 2018-07-07 22:52:36 UTC
spamassassin-3.4.1-20.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.