Bug 843443 - SELinux prevents snmpd (snmpd_t) from writing to /var/run/clumond.sock (ricci_modcluster_var_run_t)
SELinux prevents snmpd (snmpd_t) from writing to /var/run/clumond.sock (ricci...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.9
All Linux
medium Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-26 06:47 EDT by Milos Malik
Modified: 2013-01-07 22:32 EST (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-2.4.6-331.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 849262 (view as bug list)
Environment:
Last Closed: 2013-01-07 22:32:45 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 Milos Malik 2012-07-26 06:47:13 EDT
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-devel-2.4.6-329.el5
selinux-policy-minimum-2.4.6-329.el5
selinux-policy-targeted-2.4.6-329.el5
selinux-policy-strict-2.4.6-329.el5
selinux-policy-2.4.6-329.el5
selinux-policy-mls-2.4.6-329.el5
cluster-snmp-0.12.1-7.el5
modcluster-0.12.1-7.el5
net-snmp-5.3.2.2-18.el5
net-snmp-devel-5.3.2.2-18.el5
net-snmp-libs-5.3.2.2-18.el5
net-snmp-utils-5.3.2.2-18.el5

How reproducible:
always

Steps to Reproduce:
1. get a RHEL-5.8 machine with active targeted policy
2. run following automated test:
/CoreOS/selinux-policy/Regression/bz466470-snmpd-wants-getsched-setsched
3. search for AVCs
  
Actual results:
----
type=PATH msg=audit(07/26/2012 12:42:22.363:177) : item=0 name=(null) inode=66086 dev=03:03 mode=socket,755 ouid=root ogid=root rdev=00:00 obj=root:object_r:ricci_modcluster_var_run_t:s0 
type=SOCKETCALL msg=audit(07/26/2012 12:42:22.363:177) : nargs=3 a0=c a1=bffafdaa a2=6e 
type=SOCKADDR msg=audit(07/26/2012 12:42:22.363:177) : saddr=local /var/run/clumond.sock 
type=SYSCALL msg=audit(07/26/2012 12:42:22.363:177) : arch=i386 syscall=socketcall(connect) success=no exit=-13(Permission denied) a0=3 a1=bffafd60 a2=e95710 a3=0 items=1 ppid=1 pid=13257 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=4 comm=snmpd exe=/usr/sbin/snmpd subj=root:system_r:snmpd_t:s0 key=(null) 
type=AVC msg=audit(07/26/2012 12:42:22.363:177) : avc:  denied  { write } for  pid=13257 comm=snmpd name=clumond.sock dev=hda3 ino=66086 scontext=root:system_r:snmpd_t:s0 tcontext=root:object_r:ricci_modcluster_var_run_t:s0 tclass=sock_file 
----

Expected results:
* no AVCs
Comment 1 Milos Malik 2012-07-26 06:54:12 EDT
Following AVCs appeared in permissive mode:
----
type=PATH msg=audit(07/26/2012 12:52:45.042:183) : item=0 name=(null) inode=66086 dev=03:03 mode=socket,755 ouid=root ogid=root rdev=00:00 obj=root:object_r:ricci_modcluster_var_run_t:s0 
type=SOCKETCALL msg=audit(07/26/2012 12:52:45.042:183) : nargs=3 a0=c a1=bfaa8b1a a2=6e 
type=SOCKADDR msg=audit(07/26/2012 12:52:45.042:183) : saddr=local /var/run/clumond.sock 
type=SYSCALL msg=audit(07/26/2012 12:52:45.042:183) : arch=i386 syscall=socketcall(connect) success=yes exit=0 a0=3 a1=bfaa8ad0 a2=e08710 a3=0 items=1 ppid=1 pid=13698 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=4 comm=snmpd exe=/usr/sbin/snmpd subj=root:system_r:snmpd_t:s0 key=(null) 
type=AVC msg=audit(07/26/2012 12:52:45.042:183) : avc:  denied  { connectto } for  pid=13698 comm=snmpd path=/var/run/clumond.sock scontext=root:system_r:snmpd_t:s0 tcontext=root:system_r:ricci_modclusterd_t:s0 tclass=unix_stream_socket 
type=AVC msg=audit(07/26/2012 12:52:45.042:183) : avc:  denied  { write } for  pid=13698 comm=snmpd name=clumond.sock dev=hda3 ino=66086 scontext=root:system_r:snmpd_t:s0 tcontext=root:object_r:ricci_modcluster_var_run_t:s0 tclass=sock_file 
----
Comment 2 RHEL Product and Program Management 2012-07-26 06:58:36 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 3 Miroslav Grepl 2012-07-26 08:09:23 EDT
We need to backport fixes from RHEL6 for this.
Comment 5 Miroslav Grepl 2012-07-30 02:41:31 EDT
Fixed in selinux-policy-2.4.6-330.el5
Comment 8 Miroslav Grepl 2012-08-06 04:35:09 EDT
Fixed in selinux-policy-2.4.6-331.el5
Comment 10 Jan Pokorný 2012-08-17 17:40:14 EDT
Thanks for (even) noticing this and please have a look at something
similar for RHEL 6.3 (haven't tested previous minor releases): bug 849262.
Comment 12 errata-xmlrpc 2013-01-07 22:32:45 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-0060.html

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