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 965398 - mail delivery causes avc denial
Summary: mail delivery causes avc denial
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
medium
high
Target Milestone: beta
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
: 916624 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-21 07:36 UTC by Petr Sklenar
Modified: 2014-06-18 02:21 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-86.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:01:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2013-05-21 07:36:14 UTC
Description of problem:
mail delivery causes avc denial

Version-Release number of selected component (if applicable):
dovecot-2.2.1-3.el7.x86_64
mailx-12.5-8.el7.x86_64
selinux-policy-3.12.1-40.el7.noarch


How reproducible:
always

Steps to Reproduce:
1. alternatives --set mta /usr/sbin/sendmail.postfix
2. /bin/systemctl restart  dovecot.service
3. echo -e 'body-436287\n' |mail -s subj-436287 mailtest@localhost

Actual results:
various avc denials:

----
time->Sat May 18 05:55:01 2013
type=SYSCALL msg=audit(1368852901.798:1166): arch=c000003e syscall=4 success=no exit=-13 a0=7fb07847db07 a1=7fff22f199d0 a2=7fff22f199d0 a3=0 items=0 ppid=18307 pid=18311 auid=4294967295 uid=1003 gid=1006 euid=1003 suid=1003 fsuid=1003 egid=1006 sgid=1006 fsgid=1006 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368852901.798:1166): avc:  denied  { getattr } for  pid=18311 comm="deliver" path="/dev/mqueue" dev="mqueue" ino=6484 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir
----

----
time->Sat May 18 06:36:37 2013
type=AVC msg=audit(1368873397.486:559): avc:  denied  { sys_resource } for  pid=41712 comm="dovecot" capability=24  scontext=system_u:system_r:dovecot_t:s0 tcontext=system_u:system_r:dovecot_t:s0 tclass=capability
Fail: AVC messages found.
--------
----
time->Sat May 18 02:23:04 2013
type=AVC msg=audit(1368858184.111:550): avc:  denied  { getattr } for  pid=3950 comm="deliver" path="/dev/mqueue" dev="mqueue" ino=7025 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir
----
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.080:945): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b07 a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.080:945): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/dev/pts" dev="devpts" ino=1 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.080:946): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b07 a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.080:946): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/sys/fs/pstore" dev="pstore" ino=6565 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:pstorefs_t:s0 tclass=dir
----


Expected results:
no avd denial

Additional info:

Comment 3 Petr Sklenar 2013-05-21 07:40:56 UTC
I am sorry its dupe of: bug 916624
anyway how is possible that there are denial only on rhel7? not on F19?

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

Comment 4 Miroslav Grepl 2013-05-22 07:25:17 UTC
Well I see we don't have fixes on F19 too.

# cat /tmp/log |audit2allow


#============= dovecot_deliver_t ==============
allow dovecot_deliver_t devpts_t:dir getattr;
allow dovecot_deliver_t pstorefs_t:dir getattr;
allow dovecot_deliver_t tmpfs_t:dir getattr;


it means we don't have rules. Does mail delivery work correctly?


I would add 

commit f3e68656cd84b9fc76a248a538d1d666618c5a74
Author: Miroslav Grepl <mgrepl>
Date:   Wed May 22 09:23:20 2013 +0200

    Dontaudit to getattr on dirs for dovecot-deliver

Comment 5 Milos Malik 2013-05-22 08:14:24 UTC
There are more AVCs in the log files. It seems like dovecot is checking various mount points.
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.079:944): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b06 a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.079:944): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/dev/shm" dev="tmpfs" ino=6553 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.080:945): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b07 a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.080:945): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/dev/pts" dev="devpts" ino=1 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.080:946): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b07 a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.080:946): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/sys/fs/pstore" dev="pstore" ino=6565 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:pstorefs_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.080:947): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b0a a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.080:947): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/proc/sys/fs/binfmt_misc" dev="binfmt_misc" ino=1 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:binfmt_misc_fs_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.081:948): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b07 a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.081:948): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/dev/mqueue" dev="mqueue" ino=6487 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.081:949): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b0a a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.081:949): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/dev/hugepages" dev="hugetlbfs" ino=10929 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:hugetlbfs_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.081:950): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b09 a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.081:950): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/sys/kernel/config" dev="configfs" ino=10930 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:configfs_t:s0 tclass=dir
----
time->Sat May 18 06:31:55 2013
type=SYSCALL msg=audit(1368873115.082:951): arch=c000003e syscall=4 success=no exit=-13 a0=7ffa76720b0c a1=7fff987fd270 a2=7fff987fd270 a3=0 items=0 ppid=8705 pid=8706 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1368873115.082:951): avc:  denied  { getattr } for  pid=8706 comm="deliver" path="/proc/sys/fs/binfmt_misc" dev="binfmt_misc" ino=1 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:binfmt_misc_fs_t:s0 tclass=dir
----

Comment 6 Miroslav Grepl 2013-06-04 13:49:17 UTC
*** Bug 916624 has been marked as a duplicate of this bug. ***

Comment 7 Miroslav Grepl 2013-06-04 14:00:43 UTC
And how about the latest selinux-policy builds?

Comment 10 Miroslav Grepl 2013-07-22 08:24:28 UTC
#!!!! This avc has a dontaudit rule in the current policy
allow dovecot_deliver_t binfmt_misc_fs_t:dir getattr;
allow dovecot_deliver_t configfs_t:dir getattr;

#!!!! This avc has a dontaudit rule in the current policy
allow dovecot_deliver_t devpts_t:dir getattr;

#!!!! This avc has a dontaudit rule in the current policy
allow dovecot_deliver_t hugetlbfs_t:dir getattr;
allow dovecot_deliver_t pstorefs_t:dir getattr;

#!!!! This avc has a dontaudit rule in the current policy
allow dovecot_deliver_t tmpfs_t:dir getattr;

Comment 14 Ludek Smid 2014-06-13 10:01:55 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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