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

No 0 address check present in `Starklane::depositTokens` function, one can transfer token to arbitrary address on L2

Vulnerability Details

The Starklane::depositTokens doesn't check for 0 address for the function parameter snaddress ownerL2.

if (!Cairo.isFelt252(snaddress.unwrap(ownerL2))) {
//unrwaps the L2 owner address to check if it is a felt252
revert CairoWrapError();
}

This check just ensures if the value is a felt252 or not, 0 address check is not done.

link to code

Impact

It can transfer tokens to an unexpected address on L2.

Tools Used

Manual review

Recommendations

Check for 0 address input.

require(ownerL2 != 0, "Invalid address");
Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

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