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

Uncheck parameter in `setL1L2CollectionMapping`

Summary

collectionL2 param is not being checked if felt252 or zero in setL1L2CollectionMapping

Vulnerability Details

setL1L2CollectionMapping expects the parameter `collectionL2` to be of type snaddress. The problem is that snaddress is a wrapper around uint256 and its size is only checked if the custom snaddressWrap function is called. It is not the case here. collectionL2 could potentially be higher than the felt prime number or zero which will case trouble on L2, the message will never arrive.

Impact

If the collection address is set to zero, that will cause the withdraw handler on L2 to fail

Tools Used

Manual review

Recommendations

Check if collectionL2 is indeed a felt252 and not zero

Updates

Lead Judging Commences

n0kto Lead Judge 10 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.