Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6076

NPE and server crash sending multi-block-change packets for uninitialized chunk sections

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • git-Spigot-379750e-1e76d09 (MC: 1.16.2)
    • Yes

      The server only tracks 16x16x16 chunk sections once blocks are present in them. Otherwise, those chunk sections are null. The issue with this is that we can interact with those null chunk sections and have them still be null - for example, by sending players fake block changes. When you go to update more than 1 of those block states back to being air, the server constructs PacketPlayOutMultiBlockChange packets that may contain null chunk sections. When this happens, the entire server crashes from an NPE in the packet's constructor.

      The server should be patched to check whether the chunk section is null and initialize it before constructing the multi block change packet.

      This issue only appears to be present on 1.16.2

        1. latest.log
          16 kB
        2. TestPlugin.java
          2 kB
        3. TestPlugin-1.java
          1 kB

            Unassigned Unassigned
            mergu James E Hopkins
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: