GHSA-5JFW-35XP-5M42

Vulnerability from github – Published: 2022-04-05 17:53 – Updated: 2022-04-05 17:53
VLAI
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 to patch it.

For more information

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "pocketmine/bedrock-protocol"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8.0.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-124"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2022-04-05T17:53:22Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Impact\n`LoginPacket` uses `BinaryStream-\u003egetLInt()` to read the lengths of JSON payloads it wants to decode. Unfortunately, `BinaryStream-\u003egetLInt()` 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-\u003eget()` to throw an exception.\n\nIn the context of PocketMine-MP, this leads to a server crash when the vulnerability is exploited.\n\n### Patches\ne3fce7632b94e83fd6a518a87dcaf6a11681c4ac\n\n### Workarounds\nThis 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.\n\n### For more information\n* Email us at [team@pmmp.io](mailto:team@pmmp.io)",
  "id": "GHSA-5jfw-35xp-5m42",
  "modified": "2022-04-05T17:53:22Z",
  "published": "2022-04-05T17:53:22Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/pmmp/BedrockProtocol/security/advisories/GHSA-5jfw-35xp-5m42"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pmmp/BedrockProtocol/commit/e3fce7632b94e83fd6a518a87dcaf6a11681c4ac"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/pmmp/BedrockProtocol"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Buffer length underflow in LoginPacket causing unchecked exceptions to be thrown"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…