Bug 205353 - smbd allows ports higher than 65536.
smbd allows ports higher than 65536.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: samba (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Simo Sorce
David Lawrence
: Reopened
Depends On:
Blocks: 222397 253671 429003
  Show dependency treegraph
 
Reported: 2006-09-06 04:50 EDT by Jose Plans
Modified: 2013-01-16 13:05 EST (History)
4 users (show)

See Also:
Fixed In Version: RHEA-2007-0698
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-13 17:38:08 EDT
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. (1.20 KB, patch)
2006-09-06 04:50 EDT, Jose Plans
no flags Details | Diff

  None (edit)
Description Jose Plans 2006-09-06 04:50:23 EDT
Description of problem:

  When an invalid port number that exceeds 0x10000(65536) is specified by the
  smbd and nmbd 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]# smbd -p 65537

[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
smbd      24449 root   20u  IPv4  66689       TCP *:tcpmux (LISTEN)

[root@RHEL4U4]# nmbd -p 65537
[root@RHEL4U4]# lsof -i
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
......................................................................... ......
smbd      24449 root   20u  IPv4  66689       TCP *:tcpmux (LISTEN)
nmbd      24453 root    7u  IPv4  66768       UDP *:tcpmux
nmbd      24453 root    8u  IPv4  66769       UDP *:netbios-dgm
nmbd      24453 root    9u  IPv4  66771       UDP 10.34.211.121:tcpmux
nmbd      24453 root   10u  IPv4  66772       UDP 10.34.211.121:netbios-dgm
[root@RHEL4U4]#
[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 netbios-dgm
netbios-dgm     138/tcp                         # NETBIOS Datagram Service
netbios-dgm     138/udp


Version-Release number of selected component (if applicable):
All, even upstream.

How reproducible:
Always.

Steps to Reproduce:
1. As shown on the description. smbd -p 65537; lsof -i
  
Actual results:
tcpmux (port 1 is listening)

Expected results:
default smbd/nmbd set.

Additional info:
[Patch proposed]
Comment 1 Jose Plans 2006-09-06 04:50:24 EDT
Created attachment 135637 [details]
Patch fixing the problem.
Comment 2 RHEL Product and Program Management 2007-05-09 05:42:23 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 7 errata-xmlrpc 2007-11-15 11:14:38 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/RHEA-2007-0698.html
Comment 12 Petr Šplíchal 2008-06-12 06:21:09 EDT
Just to make it clear for possible further testing: The final patch does not set
ports to default values when a bad port number is specified. Instead the
solution is that these bad ports are ignored (no ports are opened by smbd).

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