GHSA-5jfw-35xp-5m42

    Dashboard / Vulnerabilities / GHSA-5jfw-35xp-5m42

    GHSA-5jfw-35xp-5m42

    Published: 5 Apr 2022Last Modified: 5 Dec 2024

    Summary: Buffer length underflow in LoginPacket causing unchecked exceptions to be thrown

    Details: ### 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](https://github.com/pmmp/BedrockProtocol/blob/47532c95ea37d5f0365b23f734d70d943ff95295/src/LoginPacket.php#L54) to patch it. ### For more information * Email us at [[email protected]](mailto:[email protected])

    Affected packages

    Package

    Name: pocketmine/bedrock-protocol

    Purl: pkg:composer/pocketmine/bedrock-protocol

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 0
    Fixed -8.0.2

    Affected versions

    1.0.0+bedrock-1.17.10

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-5jfw-35xp-5m42 | CVE-DB