code-423n4 / 2024-05-gondi-mitigation-findings

0 stars 0 forks source link

M-15 MitigationConfirmed #80

Open c4-bot-4 opened 5 months ago

c4-bot-4 commented 5 months ago

Lines of code

Vulnerability details

Issue

getMinTimeBetweenWithdrawalQueues is calculated based on IPoolOfferHandler(_offerHandler).getMaxDuration(). However, when _offerHandler is changed, it is not recalculated. In case, the new getMaxDuration() is larger than the old one, it could cause ​​pendingQueues to be overwritten prematurely.

Mitigation

The sponsor added a check to ensure the new max duration will not be larger than old max duration without updating getMinTimeBetweenWithdrawalQueues.

+         if (IPoolOfferHandler(__underwriter).getMaxDuration() > IPoolOfferHandler(getUnderwriter).getMaxDuration()) {
+            revert InvalidInputError();
+        }
c4-judge commented 5 months ago

alex-ppg marked the issue as satisfactory