Bug 1383473 - SELinux is preventing exim from 'connectto' accesses on the unix_stream_socket /run/dbus/system_bus_socket.
Summary: SELinux is preventing exim from 'connectto' accesses on the unix_stream_socke...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4704becb658ae78a664e048358c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-10 18:01 UTC by Giovanni Campagna
Modified: 2016-10-22 07:54 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-220.fc25 selinux-policy-3.13.1-191.19.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-22 04:01:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Giovanni Campagna 2016-10-10 18:01:23 UTC
Description of problem:
This problem is caused by using systemd-resolved + nss_resolve module.

nss_resolve module connects to the system bus to talk to resolved, so any process which makes dns calls in any form needs system bus access
SELinux is preventing exim from 'connectto' accesses on the unix_stream_socket /run/dbus/system_bus_socket.

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

If you believe that exim should be allowed connectto access on the system_bus_socket unix_stream_socket 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 'exim' --raw | audit2allow -M my-exim
# semodule -X 300 -i my-exim.pp

Additional Information:
Source Context                system_u:system_r:exim_t:s0-s0:c0.c1023
Target Context                system_u:system_r:system_dbusd_t:s0-s0:c0.c1023
Target Objects                /run/dbus/system_bus_socket [ unix_stream_socket ]
Source                        exim
Source Path                   exim
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-214.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.0-0.rc7.git0.1.fc25.x86_64 #1
                              SMP Mon Sep 19 15:24:06 UTC 2016 x86_64 x86_64
Alert Count                   12
First Seen                    2016-10-08 18:00:01 PDT
Last Seen                     2016-10-10 10:49:15 PDT
Local ID                      cf67cd0a-9562-4de0-b686-3d877d3dc4be

Raw Audit Messages
type=AVC msg=audit(1476121755.699:388): avc:  denied  { connectto } for  pid=11906 comm="exim" path="/run/dbus/system_bus_socket" scontext=system_u:system_r:exim_t:s0-s0:c0.c1023 tcontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tclass=unix_stream_socket permissive=0


Hash: exim,exim_t,system_dbusd_t,unix_stream_socket,connectto

Version-Release number of selected component:
selinux-policy-3.13.1-214.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.0-0.rc7.git0.1.fc25.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2016-10-11 08:21:17 UTC
Lukas,
it looks we will need to update 

sysnet_dns_name_resolve()

interface to support this configuration.

Comment 3 Fedora Update System 2016-10-19 19:56:03 UTC
selinux-policy-3.13.1-220.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-213537f6e8

Comment 4 Fedora Update System 2016-10-20 21:58:52 UTC
selinux-policy-3.13.1-191.19.fc24 has been pushed to the Fedora 24 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-e035472778

Comment 5 Fedora Update System 2016-10-22 04:01:10 UTC
selinux-policy-3.13.1-220.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2016-10-22 07:54:34 UTC
selinux-policy-3.13.1-191.19.fc24 has been pushed to the Fedora 24 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.