Bug 1059742 - SELinux policy forbids spampd connection
Summary: SELinux policy forbids spampd connection
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-30 14:31 UTC by Erik Logtenberg
Modified: 2014-02-18 14:05 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-02-11 18:42:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Erik Logtenberg 2014-01-30 14:31:11 UTC
Description of problem:

Spampd is not allowed by SELinux policy to connect back to Postfix for mail delivery.

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

spampd-2.30-16.fc20.noarch
selinux-policy-targeted-3.12.1-119.fc20.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install spampd
2. Configure spampd to listen on 127.0.0.1:10026 and connect to 127.0.0.1:10027, which is suggested by Fedora documentation
3. Run spampd
4. Connection denied by SELinux

Actual results:

type=AVC msg=audit(1391087514.778:5806): avc:  denied  { name_connect } for  pid=3078 comm="spampd" dest=10027 scontext=system_u:system_r:spamd_t:s0 tcontext=system_u:object_r:spamd_port_t:s0 tclass=tcp_socket

Additional info:

Apparently there is no SELinux policy for spampd. Instead, spampd is handled the same way as spamd, which is part of the spamassassin package. The spamd rules are part of the spamassassin policy.
Spamd doesn't need to connect to tcp/10027 because it doesn't work as a proxy, the way spampd does. As a result, spampd isn't allowed that connection either, and so it doesn't work.

By the way, I noticed that in fact for Fedora 16 a spampd policy was introduced, see bug #844784. I don't know what happened to that policy.

Comment 1 Christopher Meng 2014-02-08 10:29:57 UTC
Can selinux maintainer create a policy or confirm if this is a new bug?

Comment 2 Miroslav Grepl 2014-02-11 18:42:02 UTC
commit 3f320ce98cf23193a9f65ea56478ca2dfeef259d
Author: Miroslav Grepl <mgrepl>
Date:   Tue Feb 11 19:41:30 2014 +0100

    Allow spamd to connect to spamd port

Comment 3 Erik Logtenberg 2014-02-14 11:19:38 UTC
Hi Miroslav,

Thanks for fixing this issue. Maybe a bit of a noob question, but where can I find the contents of commit 3f320ce98cf23193a9f65ea56478ca2dfeef259d ? And is there already a package available in koji that I can test?

Thanks,

Erik.

Comment 4 Miroslav Grepl 2014-02-18 14:05:06 UTC
https://git.fedorahosted.org/git/selinux-policy.git

A new build is coming today.


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