collectionL2 param is not being checked if felt252 or zero in setL1L2CollectionMapping
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.
If the collection address is set to zero, that will cause the withdraw handler on L2 to fail
Manual review
Check if collectionL2 is indeed a felt252 and not zero
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.