Bug 888440 - Apcupsd SNMP monitoring blocked
Summary: Apcupsd SNMP monitoring blocked
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.3
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-18 17:29 UTC by Moray.Henderson
Modified: 2013-02-21 08:33 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.7.19-190.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:33:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0314 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-02-20 20:35:01 UTC

Description Moray.Henderson 2012-12-18 17:29:12 UTC
Description of problem:
apcupsd configured for SNMP crashes

Version-Release number of selected component (if applicable):
CentOS 6.3 (targeted policy 3.7.19) 

How reproducible:
Always

Steps to Reproduce:
1.  Configure apcupsd for snmp, for example
> UPSCABLE ether
> UPSTYPE snmp
> DEVICE 192.168.1.1:161:APC:private

2. SELinux in enforcing mode
3. service apcupsd start
  
Actual results:
It reports service started, but /var/log/messages contains
kernel: apcupsd[2117]: segfault at 8 ip 000000000040f36b sp 00007fff717afbb0 error 4 in apcupsd[400000+37000]


Expected results:
Daemon running; 'service apcupsd status' should report UPS status

Additional info:
----
time->Tue Dec 18 16:07:47 2012
type=SYSCALL msg=audit(1355846867.862:18629): arch=c000003e syscall=49 success=yes exit=0 a0=4 a1=7fffabaa61f0 a2=10 a3=7fffabaa5f30 items=0 ppid=1 pid=2162 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm="apcupsd" exe="/sbin/apcupsd" subj=unconfined_u:system_r:apcupsd_t:s0 key=(null) type=AVC msg=audit(1355846867.862:18629): avc:  denied  { node_bind } for  pid=2162 comm="apcupsd" scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:node_t:s0 tclass=udp_socket
----
time->Tue Dec 18 16:07:47 2012
type=SYSCALL msg=audit(1355846867.864:18630): arch=c000003e syscall=49 success=yes exit=0 a0=5 a1=7fffabaa61f0 a2=10 a3=7fffabaa5f30 items=0 ppid=1 pid=2162 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm="apcupsd" exe="/sbin/apcupsd" subj=unconfined_u:system_r:apcupsd_t:s0 key=(null) type=AVC msg=audit(1355846867.864:18630): avc:  denied  { net_bind_service } for  pid=2162 comm="apcupsd" capability=10  scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=unconfined_u:system_r:apcupsd_t:s0 tclass=capability type=AVC msg=audit(1355846867.864:18630): avc:  denied  { name_bind } for  pid=2162 comm="apcupsd" src=162 scontext=unconfined_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:snmp_port_t:s0 tclass=udp_socket

Dominick Grift's recommendation of 

  policy_module(myapcupsd, 1.0.0)
  gen_require(` type apcupsd_t; ')
  corenet_upd_bind_generic_node(apcupsd_t)
  corenet_udp_bind_snmp_port(apcupsd_t)

fixes it.

Comment 2 Daniel Walsh 2012-12-18 19:38:13 UTC
commit 80a5cb380cc1e9b430e9758178485ccc74a65fc1
 added to fedora 18

Comment 8 errata-xmlrpc 2013-02-21 08:33:31 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-0314.html


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