Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyone can DDOS vesting contract #271

Closed
code423n4 opened this issue Nov 10, 2021 · 1 comment
Closed

Anyone can DDOS vesting contract #271

code423n4 opened this issue Nov 10, 2021 · 1 comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

pauliax

Vulnerability details

Impact

Vest function can be accessed by anyone. It accepts arbitrary _beneficiary and pushes new vesting to the array of this beneficiary timelocks. As a malicious actor I can block any user by just invoking vest function with a tiny amount of vest token. The problem may arise later when it iterates over all the timelocks in a loop. This timelocks array does not have any boundaries so it eventually can grow so large as to make operations of the contract cost too much gas to fit in a block. The execution may exceed the block gas limit, consume all the gas provided, and fail.

Recommended Mitigation Steps

A simple solution would be to specify the exact timelock id (or an array of ids) when claiming or revoking the timelock. Another possible solution is to add auth restrictions on the vest function but it adds extra dependency trust on admins.

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Nov 10, 2021
code423n4 added a commit that referenced this issue Nov 10, 2021
@chickenpie347 chickenpie347 added the duplicate This issue or pull request already exists label Jan 4, 2022
@chickenpie347
Copy link
Collaborator

Duplicate of #120

@chickenpie347 chickenpie347 marked this as a duplicate of #120 Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants