Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-239815

"Server Address" field in handshake packet not padded correctly while user login with an IPv6 address

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.1, 21w42a, 21w43a, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 2, 1.18 Pre-release 4, 1.18 Pre-release 5, 1.18 Pre-release 6, 1.18 Pre-release 7, 1.18 Pre-release 8, 1.18 Release Candidate 1, 1.18 Release Candidate 2, 1.18 Release Candidate 3, 1.18 Release Candidate 4, 1.18, 1.18.1 Pre-release 1, 1.18.1 Release Candidate 2, 1.18.1, 22w03a, 22w05a, 22w06a, 1.18.2 Pre-release 1, 1.18.2 Pre-release 2, 1.18.2 Pre-release 3, 1.18.2 Release Candidate 1, 1.18.2, 22w11a, 22w12a, 22w13a, 22w14a, 22w15a, 22w16b, 22w17a, 22w18a, 22w19a, 1.19 Pre-release 1, 1.19 Pre-release 2, 1.19 Pre-release 3, 1.19 Pre-release 4, 1.19 Pre-release 5, 1.19 Release Candidate 2, 1.19, 22w24a, 1.19.1 Release Candidate 1, 1.19.1 Pre-release 2, 1.19.1 Pre-release 3, 1.19.1 Pre-release 4, 1.19.1 Pre-release 5, 1.19.1 Release Candidate 2, 1.19.2, 22w42a, 22w43a, 22w44a, 22w45a, 1.19.3, 23w03a, 23w04a, 23w05a, 23w06a, 23w07a, 1.19.4 Pre-release 2, 1.20.1
    • None
    • Windows 10 21H1 (10.0.19043.1319); Java 16 (16.0.1, 64bit)
    • Plausible
    • Networking
    • Low
    • Platform

      This issue only occurs while user login into a server, not on a status event.

      Since 1.17.1-pre1, the server address padded in the handshake packet while login event is inconsistency with the exact content which user provided in the "server address" textbox, different from previous versions.

      For example, if user provided "[::1]", in 1.17 and before, should padded "::1".

      But, in 1.17.1-pre1 and later, it padded some address like "0:0:0:0:0:0:0:1". Obviously, the user provided address is resolved to numeric form, then resolved back to the string form.

      Even worse, if user using a "fe80" address, the user's computer name will be padded.

      Because this change, some reverse proxy server based on the server name will not normally functional.

      Note: The packet content via Wireshark in different conditions are provided in screenshot files, for comparsion.

      Steps to reproduce:

      1. Setup a dedicated server, listening on a IPv6 address.
      2. Starting packet capture using Wireshark (or other tools) on the port which the server listening on.
      3. Use "[::1]" (or other IPv6 address) to connect to that server.
      4. See that captured packet (the first packet send by the client, marked PSH).

      Observed results:

      "0:0:0:0:0:0:0:1" is padded.

      Expected results:

      "::1" is padded.

            Unassigned Unassigned
            anterdc99 Bilin Tsui
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: