_setL1L2AddressMapping()
is used to link addresses in L1 and L2. However, when the force flag is true, the mappings are set without validating if the collectionL2 is a valid felt252. This can lead to issues if the value exceeds the felt prime number, causing potential problems in L2 and preventing the message from being delivered.
_setL1L2AddressMapping()
is implemented as follows.
When force == true
, the mappings are set directly without verifying that collectionL2 is not higher than the felt prime number, which can cause issues on L2 and prevent the message from arriving. The mapping _l2ToL1Addresses
is utilized in depositTokens()
.
If the L2 address is not correctly set, the message will fail to arrive.
The message may never arrive.
Manual review.
To solve the problem, ensure that collectionL2 is a valid felt252.
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.