RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 616344 - denials when dovecot is invoked by postfix
Summary: denials when dovecot is invoked by postfix
Keywords:
Status: CLOSED DUPLICATE of bug 612406
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-20 08:27 UTC by Ales Zelinka
Modified: 2012-09-21 12:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-21 15:16:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ales Zelinka 2010-07-20 08:27:30 UTC
Description of problem:
I have dovecot configured as LDA in postfix:
mailbox_command = /usr/libexec/dovecot/deliver

Dovecot then runs in postfix's context, confusing selinux:

type=AVC msg=audit(1279613115.572:43903): avc:  denied  { search } for  pid=31012 comm="deliver" name="dovecot" dev=dm-0 ino=2223944 scontext=unconfined_u:system_r:postfix_local_t:s0 tcontext=system_u:object_r:dovecot_var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1279613115.572:43903): arch=c000003e syscall=42 success=no exit=-13 a0=6 a1=7fff66a2cf20 a2=6e a3=118 items=0 ppid=31004 pid=31012 auid=0 uid=504 gid=504 euid=504 suid=504 fsuid=504 egid=504 sgid=504 fsgid=504 tty=(none) ses=676 comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=unconfined_u:system_r:postfix_local_t:s0 key=(null)
type=AVC msg=audit(1279613115.576:43904): avc:  denied  { search } for  pid=31012 comm="doveconf" name="dovecot" dev=dm-0 ino=393984 scontext=unconfined_u:system_r:postfix_local_t:s0 tcontext=system_u:object_r:dovecot_cert_t:s0 tclass=dir
type=SYSCALL msg=audit(1279613115.576:43904): arch=c000003e syscall=2 success=yes exit=128 a0=1815b86 a1=0 a2=1815b86 a3=0 items=0 ppid=31004 pid=31012 auid=0 uid=504 gid=504 euid=504 suid=504 fsuid=504 egid=504 sgid=504 fsgid=504 tty=(none) ses=676 comm="doveconf" exe="/usr/bin/doveconf" subj=unconfined_u:system_r:postfix_local_t:s0 key=(null)


The mail delivery still works though.
Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.7.19-29.el6.noarch
dovecot-2.0-0.8.beta6.20100630.el6.x86_64
postfix-2.6.6-2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. configure dovecot as LDA in postfix
2. send mail to local user
3. flush queues to force mail delivery

Comment 1 Daniel Walsh 2010-07-20 13:39:00 UTC
Miroslav could you add


optional_policy(`
	dovecot_domtrans_deliver(postfix_local_t)
')

Ales can you try the following commands and see if you get any other AVC messages

# cat > mydovecot.te << _EOF
policy_module(mydovecot,1.0)
gen_require(`
type postfix_local_t;
')
dovecot_domtrans_deliver(postfix_local_t)
_EOF
# make -f /usr/share/selinux/devel/Makefile
# semodule -i mydovecot.pp

Comment 2 Miroslav Grepl 2010-07-21 06:55:03 UTC
This issue should be fixed in the latest RHEL6 selinux-policy.

selinux-policy-3.7.19-31.el6.noarch 


The problem is /usr/libexec/dovecot/dovecot-lda has bad label with selinux-policy-targeted-3.7.19-29.el6.

Ales, 
please update your selinux-policy and re-test it. Thanks.

Comment 3 Miroslav Grepl 2010-07-21 15:16:03 UTC
I am closing it as duplicate of #612406 bug.

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


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