Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. pocketmine/bedrock-protocol
  4. ›
  5. GMS-2022-630

GMS-2022-630: Buffer length underflow in LoginPacket causing unchecked exceptions to be thrown

April 5, 2022 (updated April 6, 2022)

Impact

LoginPacket uses BinaryStream->getLInt() to read the lengths of JSON payloads it wants to decode. Unfortunately, BinaryStream->getLInt() returns a signed integer, meaning that a malicious client can craft a packet with a large uint32 value for payload buffer size (which would be interpreted as a negative signed int32), causing BinaryStream->get() to throw an exception.

In the context of PocketMine-MP, this leads to a server crash when the vulnerability is exploited.

Patches

e3fce7632b94e83fd6a518a87dcaf6a11681c4ac

Workarounds

This can be worked around by registering a custom LoginPacket implementation into PacketPool which overrides this code to patch it.

For more information

  • Email us at team@pmmp.io

References

  • github.com/advisories/GHSA-5jfw-35xp-5m42
  • github.com/pmmp/BedrockProtocol/commit/e3fce7632b94e83fd6a518a87dcaf6a11681c4ac
  • github.com/pmmp/BedrockProtocol/security/advisories/GHSA-5jfw-35xp-5m42

Code Behaviors & Features

Detect and mitigate GMS-2022-630 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 8.0.2

Fixed versions

  • 8.0.2

Solution

Upgrade to version 8.0.2 or above.

Source file

packagist/pocketmine/bedrock-protocol/GMS-2022-630.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:33 +0000.