code-423n4 / 2024-05-munchables-findings

3 stars 1 forks source link

setLockDuration doesn't have unlockTimeLatest controls #426

Closed howlbot-integration[bot] closed 5 months ago

howlbot-integration[bot] commented 5 months ago

Lines of code

https://github.com/code-423n4/2024-05-munchables/blob/57dff486c3cd905f21b330c2157fe23da2a4807d/src/managers/LockManager.sol/#L245

Vulnerability details

Impact

User's tokens can are frozen for extended periods of time without their possible knowledge or control.

Proof of Concept

This is temporary Freezing of Funds which is a high issue. The probability of it happening is medium, because transactions get delayed in the mempool all the time.

This kind of issue has been confirmed medium recently.

Tools Used

Recommended Mitigation Steps

Add a unlockTimeLatest deadline parameter for the locking function. Fill it with some reasonable deadline, eg 1 hour from tx submission time.

Assessed type

Invalid Validation