Bug 843443 - SELinux prevents snmpd (snmpd_t) from writing to /var/run/clumond.sock (ricci_modcluster_var_run_t)
Summary: SELinux prevents snmpd (snmpd_t) from writing to /var/run/clumond.sock (ricci...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.9
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-26 10:47 UTC by Milos Malik
Modified: 2013-01-08 03:32 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-2.4.6-331.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 849262 (view as bug list)
Environment:
Last Closed: 2013-01-08 03:32:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0060 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-01-08 08:27:19 UTC

Description Milos Malik 2012-07-26 10:47:13 UTC
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 10:54:12 UTC
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 Program Management 2012-07-26 10:58:36 UTC
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 12:09:23 UTC
We need to backport fixes from RHEL6 for this.

Comment 5 Miroslav Grepl 2012-07-30 06:41:31 UTC
Fixed in selinux-policy-2.4.6-330.el5

Comment 8 Miroslav Grepl 2012-08-06 08:35:09 UTC
Fixed in selinux-policy-2.4.6-331.el5

Comment 10 Jan Pokorný [poki] 2012-08-17 21:40:14 UTC
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-08 03:32:45 UTC
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.