Skip to content

Improperly sanitized packet tile coordinates causing DoS

High
hakusaro published GHSA-jq4j-v8pr-jv7j Jul 22, 2021

Package

TShock for Terraria

Affected versions

<= 4.5.4

Patched versions

4.5.5

Description

Impact

TShock has an implementation of a packet sanitizer and validator called Bouncer. This is responsible for preventing many of the common downfalls of a stock Terraria server. However, inconsistencies with using the TilePlacementValid method to check if tile coordinates were within the world bounds allowed a player to DoS attack a server due to unexpectedly large world framing.

Patches

TShock 4.5.5 patches the exploit. The list below shows the corrected methods within Bouncer:

  • OnTileEdit: The check was moved to be the first, and will no longer SendTileSquare upon failure.
  • OnPlaceObject: The check was moved to be the first, and will no longer SendTileSquare upon failure.
  • OnPlaceTileEntity: The check was newly added.
  • OnPlaceItemFrame: The check was newly added.
  • OnFoodPlatterTryPlacing: The check was newly added.

All subsequent versions include the fix. Due to the nature of this issue, as it effects multiple areas of Bouncer, it would be impossible to denote the specific commit that has introduced this vulnerability.

Workarounds

Update your server to TShock 4.5.5. There are no other known ways to work around this vulnerability's existence.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

No known CVE

Weaknesses

Credits