code-423n4 / 2021-06-gro-findings

0 stars 1 forks source link

strategiesLength should not be allowed to exceed MAX_STRATS #110

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

function setStrategiesLength should check that the value is not above MAX_STRATS. Now admin can set any arbitrary value for strategiesLength. The number of iterations in loops relies on this value so if it becomes too high, a block gas limit may be exceeded. Thus it makes sense to explicitly enforce the limit with MAX_STRATS.

Recommended Mitigation Steps

require _strategiesLength <= MAX_STRATS

kitty-the-kat commented 2 years ago

either non-critical or no an issue. This issue relies on malicious governance that woulnt be behind a timelock. Would also not block out any ability to save assets from the vault.

ghoul-sol commented 2 years ago

The problem is presented from different view but is essentially the result of #17 so it's non-critical.