Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-18766

Update TCP and UDP dynamic port ranges, to use the IANA range by default

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None

    Description

      Current:

      https://git.reactos.org/?p=reactos.git;a=blob;f=sdk/lib/drivers/ip/transport/tcp/tcp.c;hb=HEAD#l622

       623 UINT TCPAllocatePort(const UINT HintPort)
      ...
       636         return AllocatePortFromRange( &TCPPorts, 1024, 5000 );
      

      Note: MS docs seem to reference both 1024 and 1025, as first port...

      https://git.reactos.org/?p=reactos.git;a=blob;f=drivers/network/tcpip/include/udp.h;hb=HEAD#l9

        10 #define UDP_STARTING_PORT 0x8000
        11 #define UDP_DYNAMIC_PORTS 0x8000
      

      Note: This is 32768-65535.

      Target:

      https://en.wikipedia.org/wiki/Ephemeral_port

      The RFC 6056 says that the range for ephemeral ports should be 1024-65535.

      The Internet Assigned Numbers Authority (IANA) and RFC 6335 suggests the range 49152-65535 (215 + 214 to 216 − 1) for dynamic or private ports.

      Windows Server 2003 uses the range 1025-5000 by default, until Microsoft security update MS08-037 from 2008 is installed, after which it uses the IANA range by default.


      https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/service-overview-and-network-port-requirements

      Service overview and network port requirements for Windows


      https://learn.microsoft.com/en-US/troubleshoot/windows-server/networking/default-dynamic-port-range-tcpip-chang

      The default dynamic port range for TCP/IP has changed since Windows Vista and in Windows Server 2008


      https://learn.microsoft.com/en-us/security-updates/SecurityBulletins/2008/ms08-037

      After installing the updates offered by this security bulletin, the default behavior on Microsoft Windows Server 2000 and Windows Server 2003 will be to allocate sockets randomly from the port range 49152 to 65535. If the MaxUserPort range has been defined, then ports will be allocated randomly from 1024 to the defined value in the MaxUserPort registry key setting.

      Note:
      MaxUserPort registry key is not supported by ROS yet. And not part of this ticket.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Serge Gautherie Serge Gautherie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: