code-423n4 / 2022-09-vtvl-findings

0 stars 0 forks source link

UNBOUNDED LOOPS MAY CAUSE `createClaimsBatch()` TO FAIL #464

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L353

Vulnerability details

Impact

There are no limits on the number of claims, which may cause the feature to fail due to a certain number of claims entered.

Proof of Concept

There are no upper bounds on this loop:

FIle: contracts/VTVLVesting.sol

for (uint256 i = 0; i < length; i++) {
            _createClaimUnchecked(_recipients[i], _startTimestamps[i], _endTimestamps[i], _cliffReleaseTimestamps[i], _releaseIntervalsSecs[i], _linearVestAmounts[i], _cliffAmounts[i]);
        }

https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L353

Recommended Mitigation Steps

Indicate an upper limit on the number of claims so that all calls work correctly without any loss.

0xean commented 2 years ago

closing as invalid, admin can call with smaller number of inputs.