Submitted by klau5, also found by 0xlemon, MrPotatoMagic, and shaflow2
https://github.com/code-423n4/2024-12-bakerfi/blob/3873b82ae8b321473f3afaf08727e97be0635be9/contracts/core/VaultBase.sol#L244
Before the first deposit or when all shares have been withdrawn making totalSupply zero, an attacker can manipulate totalAssets by directly sending tokens to the Strategy, making the Vault permanently unusable. Additionally, in normal usage scenarios, small amounts of assets remaining in the Strategy can cause the same issue.
When depositing assets into the Vault, VaultBase._depositInternal is called. This function only allows cases where both totalAssets and totalSupply are either zero or both positive. However, its possible to make totalAssets non-zero while totalSupply is zero. This prevents any user from depositing tokens into the Vault.
The totalAssets function returns the value of _totalAssets, which is defined in both Vault and MultiStrategyVault. These return strategy.totalAssets 
For example, looking at StrategyLeverageAAVEv3.getBalances, if an attacker deposits aTokens into the StrategyLeverageAAVEv3 contract before any Vault deposits, totalAssets will become greater than zero.
Furthermore, this issue can also occur in normal usage scenarios. When all shares are withdrawn from the Vault, totalSupply returns to zero. However, when calculating the number of asset tokens to give to users, the result rounds down. Therefore, a small amount of asset tokens might remain unwithdrawn in the Strategy. Subsequently, this Vault becomes unusable.
This is the PoC. You can run it by adding it to the Vault.ts file. 
Create a function that can withdraw assets when totalSupply is zero but totalAssets is non-zero. Call this function in _depositInternal to clean up the Strategy.
chefkenji (BakerFi) acknowledged and commented:
