Submitted by 0xCiphky
The requestSlashing function allows a slashing to be requested for a given operators deployed vaults staked to the DSS.  The slashing request must pass the SLASHING_VETO_WINDOW (2 days) before it can be confirmed, allowing the veto committee to cancel any unfair queued slashing.
This time gap can create situations where the requested slashed amount is no longer possible, as the contract might have had previous withdrawals or been slashed by other DSSs in that time, reducing its overall balance. The slashAssets function in the vault contract handles this by taking the minimum of the requested slashed amount and the contract balance.
However, if the total assets in the contract are zero, the transferAmount will be zero. When this zero value is passed to the handleSlashing function, it will revert due to a check that ensures the amount is not zero.
As a result, if this slashing reverts and since a slash request can include multiple slashes for different vaults, the entire transaction will revert, blocking other vault slashes as well.
If the slashAssets function encounters this scenario while attempting to slash assets, it will cause the entire transaction to revert. This will block other slashing requests within the same transaction and lead to additional logical issues as described above.
The slashAssets function in the vault contract should only approve and call handleSlashing if transferAmount is greater than zero. This way, the function will not revert, and other slashes will go through.
MiloTruck (judge) commented:
karan-andalusia (Karak) confirmed
Karak mitigated:
Status: Mitigation confirmed. Full details in reports from 0xCiphky, KupiaSec and sl1.
For this audit, 15 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by rbserver received the top score from the judge.
The following wardens also submitted reports: ZanyBonzy, Rhaydden, Shaheen, 0xCiphky, iam_emptyset, peanuts, anonymousjoe, 0xlemon, c0pp3rscr3w3r, lanrebayode77, KupiaSec, gesha17, falconhoof, and 4rdiii.
