The current implementation of the setUpdateWeightRunnerAddress
allows admin to set the old address (the current value of updateWeightRunner
) as the new _updateWeightRunner
address, which could remain unchanged since the admin is setting the same value.
If the admin set in the same address as before the system will remain unchanged, this effectively becomes a no-op functionality, as the system behavior remains the same.
The function event will definitely be emitted, but it will log the same address for both the old and new values. This might cause confusion i.e. if logs are being reviewed because it appears as though an update occurred, even though the address didn't change.
Meanwhile the transaction will still consume gas unnecessarily, even though no actual state change occurs.
Potential misuse: Where by admin might mistakenly think they needed to reset the address.
Gas consumption: Since no actual state changes.
Confusion when event are emitted but log the same address if being reviewed.
Manual review
To prevent this, the function should include a check to ensure the new address is different from the current one
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.