Bug 709257

Summary: SELinux is preventing /usr/libexec/dovecot/dovecot-lda from 'connectto' accesses on the unix_stream_socket /var/run/dovecot/auth-userdb.
Product: [Fedora] Fedora Reporter: John Drinkwater <john>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:acc65ab7c7d73c21e5610c529e2d808b8a9359daa7e78fa7c115c924c21ce37f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-31 09:59:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Drinkwater 2011-05-31 08:03:44 UTC
SELinux is preventing /usr/libexec/dovecot/dovecot-lda from 'connectto' accesses on the unix_stream_socket /var/run/dovecot/auth-userdb.

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

If you believe that dovecot-lda should be allowed connectto access on the auth-userdb 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:
# grep dovecot-lda /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:dovecot_deliver_t:s0
Target Context                unconfined_u:system_r:dovecot_t:s0
Target Objects                /var/run/dovecot/auth-userdb [ unix_stream_socket
                              ]
Source                        dovecot-lda
Source Path                   /usr/libexec/dovecot/dovecot-lda
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dovecot-2.0.12-2.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-40.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.i686
                              #1 SMP Mon Feb 7 07:04:18 UTC 2011 i686 i686
Alert Count                   20
First Seen                    Tue 31 May 2011 08:36:27 BST
Last Seen                     Tue 31 May 2011 09:01:47 BST
Local ID                      ac91b8f1-5aa5-400b-a165-5689ca5d8443

Raw Audit Messages
type=AVC msg=audit(1306828907.713:14185): avc:  denied  { connectto } for  pid=12928 comm="dovecot-lda" path="/var/run/dovecot/auth-userdb" scontext=unconfined_u:system_r:dovecot_deliver_t:s0 tcontext=unconfined_u:system_r:dovecot_t:s0 tclass=unix_stream_socket


type=SYSCALL msg=audit(1306828907.713:14185): arch=i386 syscall=socketcall success=no exit=EACCES a0=3 a1=bfcfccf0 a2=71d4e4 a3=bfcfcd1e items=0 ppid=12918 pid=12928 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=2029 comm=dovecot-lda exe=/usr/libexec/dovecot/dovecot-lda subj=unconfined_u:system_r:dovecot_deliver_t:s0 key=(null)

Hash: dovecot-lda,dovecot_deliver_t,dovecot_t,unix_stream_socket,connectto

audit2allow

#============= dovecot_deliver_t ==============
#!!!! This avc is allowed in the current policy

allow dovecot_deliver_t dovecot_t:unix_stream_socket connectto;

audit2allow -R

#============= dovecot_deliver_t ==============
#!!!! This avc is allowed in the current policy

allow dovecot_deliver_t dovecot_t:unix_stream_socket connectto;

Comment 1 Dominick Grift 2011-05-31 08:14:23 UTC
Looks like it wants: dovecot_stream_connect(dovecot_deliver_t). Problem is that dovecot_deliver_t also seems to want to read that socket. #709255

Comment 2 Dominick Grift 2011-05-31 09:15:52 UTC
dovecot_deliver_t connects to dovecot_t with a unix stream socket:

http://git.fedorahosted.org/git/?p=selinux-policy.git;a=commitdiff;h=3985ee8bbd4ef629d9b39d82e372419ba357f483

Comment 3 Miroslav Grepl 2011-05-31 09:59:31 UTC

*** This bug has been marked as a duplicate of bug 709255 ***