Bug 205354

Summary: When an invalid port number that exceeds 0x10000(65536) is specified by the rpc.yppasswdd, ypserv and rpc.ypxfrd command, an improper port number is generated.
Product: Red Hat Enterprise Linux 4 Reporter: Jose Plans <jplans>
Component: ypservAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: cfeist, pm-rhel, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0211 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-01 22:43:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch fixing the problem. none

Description Jose Plans 2006-09-06 09:06:33 UTC
Description of problem:

  When an invalid port number that exceeds 0x10000(65536) is specified by the
  rpc.yppasswdd, ypserv and rpc.ypxfrd command, an improper port number is
  generated.
  
  ** port number definition: unsigned short
  
  ex.) specified number: 65537(0x10001)
   ** generated port number : 1 \u2192 65537(0x10001) - 65536(0x10000)
  
[root@RHEL4U4]# rpc.yppasswdd --port 65537

[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
rpc.yppas 24926 root    4u  IPv4  75068       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]# service yppasswdd stop
Stopping YP passwd service:                                [  OK  ]

[root@RHEL4U4]# ypserv -p 65537

[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
ypserv   24952 root    5u  IPv4  75216       UDP *:tcpmux
ypserv   24952 root    6u  IPv4  75221       TCP *:tcpmux (LISTEN)

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

[root@RHEL4U4]# service ypserv stop
Stopping YP server services:                               [  OK  ]

[root@RHEL4U4]# rpc.ypxfrd -p 65537

[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
rpc.ypxfr 24967 root    4u  IPv4  75293       UDP *:tcpmux
rpc.ypxfr 24967 root    5u  IPv4  75296       TCP *:tcpmux (LISTEN)

[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):
ypserv-2.13-14

How reproducible:
Always.

Steps to Reproduce:
1.As shown in the description.
  
Actual results:
Port 1 is assigned.

Expected results:

 When an invalid port number is specified, it is necessary to generate an
arbitrary empty port number within the range of 600-1023. 

Additional info:
Patch provided.

Comment 1 Jose Plans 2006-09-06 09:06:33 UTC
Created attachment 135639 [details]
Patch fixing the problem.

Comment 2 RHEL Program Management 2006-09-06 13:31:57 UTC
The component this request has been filed against is not planned for inclusion
in the next update. The decision is based on weighting the priority and number
of requests for a component as well as the impact on the Red Hat Enterprise
Linux user-base: other components are considered having higher priority and the
number of changes we intend to include in update cycles is limited.

Comment 7 Steve Dickson 2006-09-13 13:38:07 UTC
Fixed in ypserv-2.19-3 

Comment 8 Daniel Riek 2006-11-22 19:40:23 UTC
Pulling into 4.5 as an exception as the work is already done.

Comment 10 Jay Turner 2006-11-27 15:57:02 UTC
QE ack for 4.5.

Comment 16 Red Hat Bugzilla 2007-05-01 22:43:59 UTC
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-0211.html