In the function Rules::_getWeights(), while calculating the newWeightsConverted, we check if resultant weights are greater than or equal to 0 otherwise we revert in case of locals.kappaStore.length != 1
But in case of locals.kappaStore.length == 1 the check is not performed.
This allows the function to bypass the validation check, potentially leading to invalid weights being accepted.
The missing validation check for locals.kappaStore.length == 1 can lead to invalid weights being accepted, potentially causing incorrect calculations and unexpected behavior in the system.
Manual review
Add a check to ensure resultant weights are greater than or equal to 0 when locals.kappaStore.length == 1:
_clampWeights will check that these weights are positive and in the boundaries before writing them in storage.
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.