Bug 486719 - dovecot deliver not allowed for transition from dovecot_deliver_t to tmp_t
dovecot deliver not allowed for transition from dovecot_deliver_t to tmp_t
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
10
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-21 07:43 EST by lejeczek
Modified: 2009-11-18 06:29 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-18 06:29:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description lejeczek 2009-02-21 07:43:14 EST
Description of problem:
I did not figure out if this option - internal raw storage - is configurable in dovecot at runtime
(posted for some info)

Version-Release number of selected component (if applicable):
selinux-policy-3.5.13-44

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
maillog:
whale deliver(paweleljasz@jatymy.org): Fatal: Couldn't create internal raw storage: raw: stat(/tmp) failed: Permission denied

custom policy module solves this problem
Comment 1 lejeczek 2009-02-21 11:02:08 EST
and in 45.fc10
Comment 2 Miroslav Grepl 2009-02-23 04:35:09 EST
What avc messages are you seeing ?
Comment 3 lejeczek 2009-02-23 09:15:34 EST
time->Mon Feb 23 14:08:23 2009
type=SYSCALL msg=audit(1235398103.494:28814): arch=c000003e syscall=4 success=no exit=-13 a0=2162938 a1=7fffe6e8f7b0 a2=7fffe6e8f7b0 a3=0 items=0 ppid=17563 pid=17564 auid=4294967295 uid=505 gid=505 euid=505 suid=505 fsuid=505 egid=505 sgid=505 fsgid=505 tty=(none) ses=4294967295 comm="deliver" exe="/usr/libexec/dovecot/deliver" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1235398103.494:28814): avc:  denied  { getattr } for  pid=17564 comm="deliver" path="/tmp" dev=md0 ino=671088900 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir
----
time->Mon Feb 23 14:10:01 2009
type=SYSCALL msg=audit(1235398201.511:28831): arch=c000003e syscall=4 success=no exit=-13 a0=1a9f938 a1=7fff2d230c40 a2=7fff2d230c40 a3=0 items=0 ppid=17563 pid=17616 auid=4294967295 uid=505 gid=505 euid=505 suid=505 fsuid=505 egid=505 sgid=505 fsgid=505 tty=(none) ses=4294967295 comm="deliver" exe="/usr/libexec/dovecot/deliver" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1235398201.511:28831): avc:  denied  { getattr } for  pid=17616 comm="deliver" path="/tmp" dev=md0 ino=671088900 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir

*
there is more, after when custom module was generated with audit2 and solved the problem and dovecot deliver stopped having problems and started delivering, there were these:
*

type=SYSCALL msg=audit(1235260804.224:3622): arch=c000003e syscall=138 success=no exit=-13 a0=a a1=7fff307cac90 a2=13 a3=400 items=0 ppid=22383 pid=22384 auid=4294967295 uid=501 gid=501 euid=501 suid=501 fsuid=501 egid=501 sgid=501 fsgid=501 tty=(none) ses=4294967295 comm="deliver" exe="/usr/libexec/dovecot/deliver" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1235260804.224:3622): avc:  denied  { getattr } for  pid=22384 comm="deliver" name="/" dev=sda1 ino=2 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem
----
time->Mon Feb 23 04:02:29 2009
type=SYSCALL msg=audit(1235361749.683:27006): arch=c000003e syscall=138 success=no exit=-13 a0=a a1=7fff7a6f1790 a2=13 a3=400 items=0 ppid=4539 pid=4540 auid=4294967295 uid=501 gid=501 euid=501 suid=501 fsuid=501 egid=501 sgid=501 fsgid=501 tty=(none) ses=4294967295 comm="deliver" exe="/usr/libexec/dovecot/deliver" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1235361749.683:27006): avc:  denied  { getattr } for  pid=4540 comm="deliver" name="/" dev=sda1 ino=2 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem
----
time->Mon Feb 23 09:09:43 2009
type=SYSCALL msg=audit(1235380183.984:28185): arch=c000003e syscall=138 success=no exit=-13 a0=a a1=7fffddbcb090 a2=13 a3=400 items=0 ppid=11357 pid=11358 auid=4294967295 uid=501 gid=501 euid=501 suid=501 fsuid=501 egid=501 sgid=501 fsgid=501 tty=(none) ses=4294967295 comm="deliver" exe="/usr/libexec/dovecot/deliver" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)
type=AVC msg=audit(1235380183.984:28185): avc:  denied  { getattr } for  pid=11358 comm="deliver" name="/" dev=sda1 ino=2 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem
Comment 4 Daniel Walsh 2009-02-23 10:36:12 EST
Miroslav I would give the following access.


files_search_tmp(dovecot_deliver_t)
fs_getattr_all_fs(dovecod_deliver_t)
Comment 5 Daniel Walsh 2009-02-23 10:39:13 EST
Also dovecot.te looks like a cut/paste error 

userdom.*(dovecot_t) should be dovecot_deliver_t in the bottom of the dovecot.te file.
Comment 6 Miroslav Grepl 2009-02-27 04:50:04 EST
Fixed in selinux-policy-3.5.13-47.fc10
Comment 7 lejeczek 2009-03-05 12:47:29 EST
dear chaps,
few quickies, 
what is - /var/spool/dovect - for? (if) dovecot's deliver cannot use it? - selinux
what fcontext is correct if Maildirs to be contained outside of /home (mail virt users)? or where to put them?
there are some things I'm going to enter new bugs (managesive) with regards to selinux-policy-3.5.13-47.fc10 
but before I do, where do I get te files from, I'd like to study selinux a bit, maybe helpful

cheers
Pawel
Comment 8 Daniel Walsh 2009-03-05 14:33:36 EST
I don't know, dovecot can manage it.

manage_dirs_pattern(dovecot_t, dovecot_spool_t, dovecot_spool_t)
manage_files_pattern(dovecot_t, dovecot_spool_t, dovecot_spool_t)
manage_lnk_files_pattern(dovecot_t, dovecot_spool_t, dovecot_spool_t)

What access does dovecot_deliver need?

mail_spool_t is a file context that dovecot_deliver can write to.
Comment 9 Bug Zapper 2009-11-18 06:10:59 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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