NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Corruptible Upgradability Pattern

Summary

Without gaps, adding new storage variables to contracts can potentially overwrite the beginning of the storage layout of the child contract, causing critical misbehaviors in the system.

Vulnerability Details

The Starklane bridge contract utilizes an upgradable pattern and inherits from several contracts: StarklaneState, StarklaneEscrow, StarklaneMessaging, and CollectionManager. Each of these contracts defines state variables, but they do not implement gap storage.

In an upgradable contract pattern, adding new storage variables to any of the inherited contracts can overwrite existing storage variables in the child contract due to the tightly packed storage layout. This can lead to critical misbehaviors and potentially catastrophic system failures.

Impact

Storage of contracts might be corrupted during an upgrade.

Tools Used

vscode

Recommendations

Add gaps for inherited contracts.

Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

invalid-upgradeable-storage-gap-known-issue

Known issue: Lightchaser

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.