Bug 855895 - AVCs when running cyrus-imapd test with disabled unconfined and unlabelednet
AVCs when running cyrus-imapd test with disabled unconfined and unlabelednet
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
6.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 10:43 EDT by Michal Trunecka
Modified: 2014-09-30 19:33 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.7.19-182.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:29:06 EST
Type: Bug
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 Michal Trunecka 2012-09-10 10:43:47 EDT
Description of problem:
Cyrus-imapd automated test failed and reported AVCs listed below when unconfined and unlabelednet selinux modules disabled. Test passes without eny AVCs with both modules enabled.

----
time->Mon Sep 10 16:33:09 2012
type=PATH msg=audit(1347287589.905:3237): item=0 name="/var/lib/imap/rpm/db_import.log" inode=27511 dev=08:03 mode=0100600 ouid=76 ogid=12 rdev=00:00 obj=unconfined_u:object_r:cyrus_var_lib_t:s0
type=CWD msg=audit(1347287589.905:3237):  cwd="/var/lib/imap"
type=SYSCALL msg=audit(1347287589.905:3237): arch=c000003e syscall=2 success=no exit=-13 a0=1baf890 a1=241 a2=1b6 a3=76 items=1 ppid=3796 pid=3809 auid=0 uid=76 gid=12 euid=76 suid=76 fsuid=76 egid=12 sgid=12 fsgid=12 tty=(none) ses=3 comm="sh" exe="/bin/bash" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1347287589.905:3237): avc:  denied  { write } for  pid=3809 comm="sh" name="db_import.log" dev=sda3 ino=27511 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:object_r:cyrus_var_lib_t:s0 tclass=file
----
time->Mon Sep 10 16:33:09 2012
type=PATH msg=audit(1347287589.906:3238): item=0 name="/var/lib/imap/rpm/db_import.log" inode=27511 dev=08:03 mode=0100600 ouid=76 ogid=12 rdev=00:00 obj=unconfined_u:object_r:cyrus_var_lib_t:s0
type=CWD msg=audit(1347287589.906:3238):  cwd="/var/lib/imap"
type=SYSCALL msg=audit(1347287589.906:3238): arch=c000003e syscall=2 success=no exit=-13 a0=1baf890 a1=201 a2=1b6 a3=76 items=1 ppid=3796 pid=3809 auid=0 uid=76 gid=12 euid=76 suid=76 fsuid=76 egid=12 sgid=12 fsgid=12 tty=(none) ses=3 comm="sh" exe="/bin/bash" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1347287589.906:3238): avc:  denied  { write } for  pid=3809 comm="sh" name="db_import.log" dev=sda3 ino=27511 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:object_r:cyrus_var_lib_t:s0 tclass=file
----
time->Mon Sep 10 16:33:14 2012
type=PATH msg=audit(1347287594.224:3243): item=0 name="/var/lib/imap/rpm/db_export.log" inode=27515 dev=08:03 mode=0100600 ouid=76 ogid=12 rdev=00:00 obj=unconfined_u:object_r:cyrus_var_lib_t:s0
type=CWD msg=audit(1347287594.224:3243):  cwd="/var/lib/imap"
type=SYSCALL msg=audit(1347287594.224:3243): arch=c000003e syscall=2 success=no exit=-13 a0=1a0d890 a1=241 a2=1b6 a3=76 items=1 ppid=3881 pid=3894 auid=0 uid=76 gid=12 euid=76 suid=76 fsuid=76 egid=12 sgid=12 fsgid=12 tty=(none) ses=3 comm="sh" exe="/bin/bash" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1347287594.224:3243): avc:  denied  { write } for  pid=3894 comm="sh" name="db_export.log" dev=sda3 ino=27515 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:object_r:cyrus_var_lib_t:s0 tclass=file
----
time->Mon Sep 10 16:33:14 2012
type=PATH msg=audit(1347287594.225:3244): item=0 name="/var/lib/imap/rpm/db_export.log" inode=27515 dev=08:03 mode=0100600 ouid=76 ogid=12 rdev=00:00 obj=unconfined_u:object_r:cyrus_var_lib_t:s0
type=CWD msg=audit(1347287594.225:3244):  cwd="/var/lib/imap"
type=SYSCALL msg=audit(1347287594.225:3244): arch=c000003e syscall=2 success=no exit=-13 a0=1a0d890 a1=201 a2=1b6 a3=76 items=1 ppid=3881 pid=3894 auid=0 uid=76 gid=12 euid=76 suid=76 fsuid=76 egid=12 sgid=12 fsgid=12 tty=(none) ses=3 comm="sh" exe="/bin/bash" subj=unconfined_u:system_r:initrc_t:s0 key=(null)
type=AVC msg=audit(1347287594.225:3244): avc:  denied  { write } for  pid=3894 comm="sh" name="db_export.log" dev=sda3 ino=27515 scontext=unconfined_u:system_r:initrc_t:s0 tcontext=unconfined_u:object_r:cyrus_var_lib_t:s0 tclass=file

Version-Release number of selected component (if applicable):
cyrus-imapd-2.3.16-6.el6_2.5.x86_64
selinux-policy-3.7.19-160.el6.noarch
selinux-policy-targeted-3.7.19-160.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. semoudle -d unconfined; semodule -d unlabelednet
2. Run automated test:
/CoreOS/selinux-policy/Regression/bz504805-cyrus-master-and-mupdate-port
  
Actual results:
Test fails

Expected results:
Test passes without AVCs.
Comment 6 Miroslav Grepl 2012-11-27 09:48:22 EST
Fixed in selinux-policy-3.7.19-182.el6

# sesearch -A -s initrc_t -t cyrus_var_lib_t -c dir
Found 3 semantic av rules:
   allow initrc_t cyrus_var_lib_t : dir { ioctl read write getattr lock add_name remove_name search open } ;
Comment 12 Miroslav Grepl 2012-12-03 08:04:26 EST
Milos, I am switching it back to ON_QA.

#============= initrc_t ==============
#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
#Contraint rule: 
allow initrc_t cyrus_var_lib_t:file create;
allow initrc_t cyrus_var_lib_t:file { relabelfrom relabelto };

This should be created as a new cyrus bug.
Comment 14 errata-xmlrpc 2013-02-21 03:29:06 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0314.html

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