Bug 573884 - SELinux is preventing /usr/sbin/snmpd from binding to port 161.
Summary: SELinux is preventing /usr/sbin/snmpd from binding to port 161.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:ac1429c970f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-16 01:46 UTC by Brian Whitehead
Modified: 2010-03-30 02:11 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.6.32-106.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 02:11:07 UTC
Type: ---


Attachments (Terms of Use)

Description Brian Whitehead 2010-03-16 01:46:46 UTC
Summary:

SELinux is preventing /usr/sbin/snmpd from binding to port 161.

Detailed Description:

SELinux has denied the snmpd from binding to a network port 161 which does not
have an SELinux type associated with it. If snmpd should be allowed to listen on
161, use the semanage command to assign 161 to a port type that snmpd_t can bind
to (snmp_port_t, agentx_port_t).
If snmpd is not supposed to bind to 161, this could signal an intrusion attempt.

Allowing Access:

If you want to allow snmpd to bind to port 161, you can execute
# semanage port -a -t PORT_TYPE -p tcp 161
where PORT_TYPE is one of the following: snmp_port_t, agentx_port_t.
If this system is running as an NIS Client, turning on the allow_ypbind boolean
may fix the problem. setsebool -P allow_ypbind=1.

Additional Information:

Source Context                system_u:system_r:snmpd_t:s0
Target Context                system_u:object_r:reserved_port_t:s0
Target Objects                None [ tcp_socket ]
Source                        snmpd
Source Path                   /usr/sbin/snmpd
Port                          161
Host                          (removed)
Source RPM Packages           net-snmp-5.4.2.1-19.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-92.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   bind_ports
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.9-67.fc12.i686
                              #1 SMP Sat Feb 27 10:00:02 UTC 2010 i686 i686
Alert Count                   6
First Seen                    Tue 02 Mar 2010 08:13:35 PM CST
Last Seen                     Sat 13 Mar 2010 07:26:44 AM CST
Local ID                      5b13bb7e-ba18-4142-80dc-9434deec1dc4
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1268486804.388:8): avc:  denied  { name_bind } for  pid=1409 comm="snmpd" src=161 scontext=system_u:system_r:snmpd_t:s0 tcontext=system_u:object_r:reserved_port_t:s0 tclass=tcp_socket

node=(removed) type=SYSCALL msg=audit(1268486804.388:8): arch=40000003 syscall=102 success=no exit=-13 a0=2 a1=bfa1a9b0 a2=97831c a3=978dac items=0 ppid=1 pid=1409 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="snmpd" exe="/usr/sbin/snmpd" subj=system_u:system_r:snmpd_t:s0 key=(null)



Hash String generated from  bind_ports,snmpd,snmpd_t,reserved_port_t,tcp_socket,name_bind
audit2allow suggests:

#============= snmpd_t ==============
allow snmpd_t reserved_port_t:tcp_socket name_bind;

Comment 1 Miroslav Grepl 2010-03-16 12:20:49 UTC
Is this your local customization? I mean using using of 161/tcp port.

Comment 2 Brian Whitehead 2010-03-16 16:36:01 UTC
I don't recall making any custom changes, but will have to check.  It didn't dawn on me that this was showing TCP rather than UDP.  I will look in to why this has happened.

Comment 3 Miroslav Grepl 2010-03-18 12:41:34 UTC
Fixed in selinux-policy-3.6.32-104.fc12

Comment 4 Fedora Update System 2010-03-23 18:02:47 UTC
selinux-policy-3.6.32-106.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-106.fc12

Comment 5 Fedora Update System 2010-03-24 23:29:57 UTC
selinux-policy-3.6.32-106.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-106.fc12

Comment 6 Fedora Update System 2010-03-30 02:09:31 UTC
selinux-policy-3.6.32-106.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


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