The setL1L2CollectionMapping
function in the Starklane contract allows the owner to forcibly overwrite existing L1-L2 collection mappings without adequate validation. This can lead to unintended alterations of critical mappings.
Setup Initial Mapping:
Call setL1L2CollectionMapping(collectionL1, collectionL2, false)
to establish an initial mapping.
Attempt Overwrite Without Force:
Call setL1L2CollectionMapping(collectionL1, newCollectionL2, false)
.
Observe revert due to CollectionMappingAlreadySet
.
Overwrite With Force:
Call setL1L2CollectionMapping(collectionL1, newCollectionL2, true)
.
Mapping is overwritten without additional checks.
Legitimate mappings can be overwritten, leading to potential data inconsistencies.
Critical operations relying on stable mappings may be disrupted.
Manual Review
Foundry
Implement additional checks or confirmations when force
is used to ensure intentional overwriting.
Consider additional access controls or multi-signature requirements for operations involving forced overwrites.
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.