setL1L2CollectionMapping() allows the owner to set the _l1ToL2Addresses and _l2ToL1Addresses mappings, linking collectionL1 to collectionL2. However, this function does not whitelist collectionL1 in the _whiteList mapping, preventing users from interacting with it.
setL1L2CollectionMapping() is implemented as follows.
The internal function _setL1L2AddressMapping() is invoked.
While the mappings are established, the collectionL1 is not added to the whitelist. In contrast, new collections are whitelisted upon deployment, as demonstrated in the withdrawTokens(), where the mappings are also set.
When a new collection is deployed, it is whitelisted; however, this is not done in the setL1L2CollectionMapping(), leading to inconsistency. Consequently, the mappings are established, but users cannot bridge the collection because it is not whitelisted.
The solution involves manually calling whiteList(), but this creates an inconsistency, as the code behaves differently in withdrawTokens() compared to setL1L2CollectionMapping().
Users are unable to bridge using the new collection and also causes inconsistencies in the code.
Manual review.
To resolve the issue, whitelist collectionL1 in the setL1L2CollectionMapping().
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.