Bug 205154 - When an invalid port number that exceeds 0x10000(65536) is specified by the snmpd and snmptrapd command, an improper port number is generated.
When an invalid port number that exceeds 0x10000(65536) is specified by the ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: net-snmp (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
:
Depends On:
Blocks: 222397 449351
  Show dependency treegraph
 
Reported: 2006-09-04 20:05 EDT by Jose Plans
Modified: 2010-10-22 01:56 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0738
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 11:00:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch fixing the problem (3.23 KB, patch)
2006-09-04 20:05 EDT, Jose Plans
no flags Details | Diff

  None (edit)
Description Jose Plans 2006-09-04 20:05:49 EDT
Description of problem:


  When an invalid port number that exceeds 0x10000(65536) is specified by the
  snmpd and snmptrapd command, an improper port number is generated.  
  
  ** port number definition: unsigned short
  
  ex.) specified number: 65537(0x10001)
   ** generated port number : 1 → 65537(0x10001) - 65536(0x10000)
  
[root@RHEL4U4]# snmpd UDP:65537,udp6:65537

[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
snmpd    24866 root    9u  IPv4  74697       TCP *:smux (LISTEN)
snmpd    24866 root   11u  IPv4  74699       UDP *:tcpmux
snmpd    24866 root   12u  IPv6  74700       UDP *:tcpmux

[root@RHEL4U4]# less /etc/services | grep tcpmux
tcpmux          1/tcp                           # TCP port service multiplexer
tcpmux          1/udp                           # TCP port service multiplexer

[root@RHEL4U4]# less /etc/services | grep smux
# (due to a bug in inetd the 3com-tsmux line is disabled)
#3com-tsmux     106/tcp         poppassd
#3com-tsmux     106/udp         poppassd
smux            199/tcp                         # SNMP Unix Multiplexer
smux            199/udp

[root@RHEL4U4]# snmptrapd TCP:65537,udp6:65537
[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
snmptrapd 24736 root    8u  IPv4  71515       TCP *:tcpmux (LISTEN)
snmptrapd 24736 root    9u  IPv6  71516       UDP *:tcpmux

[root@RHEL4U4]# less /etc/services | grep tcpmux
tcpmux          1/tcp                           # TCP port service multiplexer
tcpmux          1/udp                           # TCP port service multiplexer


Version-Release number of selected component (if applicable):
net-snmp-5.1.2-11.EL4.7

How reproducible:
Always.

Steps to Reproduce:
  
Actual results:
port 1 returned.

Expected results:
Default ports to be returned if the ports are > 65536.
[root@RHEL4U4]# snmpd UDP:65537,udp6:65537
[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
snmpd    24829 root    9u  IPv4  73300       TCP *:smux (LISTEN)
snmpd    24829 root   11u  IPv4  73302       UDP *:snmp
snmpd    24829 root   12u  IPv6  73303       UDP *:snmp


root@RHEL4U4]# snmptrapd UDP:65537,udp6:65537
[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
snmptrapd 24808 root    8u  IPv4  73197       UDP *:snmptrap
snmptrapd 24808 root    9u  IPv6  73198       UDP *:snmptrap

Additional info:
Patched attached.
Comment 1 Jose Plans 2006-09-04 20:05:50 EDT
Created attachment 135517 [details]
Patch fixing the problem
Comment 2 RHEL Product and Program Management 2007-06-09 09:25:45 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 8 errata-xmlrpc 2007-11-15 11:00:17 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0738.html

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