The function deallocate may revert due to an underflow when the amountDeallocated is greater than oldAllocation.
Vulnerability Details
The function deallocate is used to remove funds from strategies by calling internal deallocate function with the specified asset amount. The function then attemps to calculate the new allocation by subtracting the amount deallocated from oldAllocation.
The vulnerability arises because amountDeallocated, which is returned by _deallocate, can potentially be greater than oldAllocation. This may happen when _deallocate withdraws more funds than expected. And when amountDeallocated exceeds oldAllocation, the tx would revert due to underflow.
Code snippet:
Impact Details
The impact is temporary freezing of funds, because the admin would not be able to deallocate funds from strategies. This is a potential Denial of Service.