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

mint/airdroptokens function can be DOSed. #644

Closed
c4-submissions opened this issue Nov 9, 2023 · 6 comments
Closed

mint/airdroptokens function can be DOSed. #644

c4-submissions opened this issue Nov 9, 2023 · 6 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working insufficient quality report This report is not of sufficient quality primary issue Highest quality submission among a set of duplicates unsatisfactory does not satisfy C4 submission criteria; not eligible for awards

Comments

@c4-submissions
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/MinterContract.sol#L223

Vulnerability details

Proof of Concept

Unbounded array i.e there is no limit in gencore.viewMaxAllowance. In nextgencore contract, when one set maxcollectionpurchase , there is no boundation.

So the problem is when one mint more tokenids in one transaction as maxcollectionpurchase may be a high number, the transaction may DOS.

function airDropTokens may also DOS as _numberOfTokens[ ] is an unbounded array.

Impact

Users may lose gas costs.

Tools Used

manual review

Recommended Mitigation Steps

bound/limit both maxcollectionpurchase and _numberOfTokens

Assessed type

DoS

@c4-submissions c4-submissions added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Nov 9, 2023
c4-submissions added a commit that referenced this issue Nov 9, 2023
@c4-pre-sort c4-pre-sort added the sufficient quality report This report is of sufficient quality label Nov 20, 2023
@c4-pre-sort
Copy link

141345 marked the issue as sufficient quality report

@c4-pre-sort
Copy link

141345 marked the issue as insufficient quality report

@c4-pre-sort c4-pre-sort added insufficient quality report This report is not of sufficient quality and removed sufficient quality report This report is of sufficient quality labels Nov 20, 2023
@alex-ppg
Copy link

alex-ppg commented Dec 6, 2023

The Warden specifies potential DoS concerns, however, they fail to weaponize them or articulate why they should be considered vulnerabilities in an acceptable manner.

@c4-judge c4-judge closed this as completed Dec 6, 2023
@c4-judge c4-judge added the unsatisfactory does not satisfy C4 submission criteria; not eligible for awards label Dec 6, 2023
@c4-judge
Copy link

c4-judge commented Dec 6, 2023

alex-ppg marked the issue as unsatisfactory:
Insufficient quality

@alex-ppg
Copy link

alex-ppg commented Dec 6, 2023

Multiple findings of the Warden have been deemed invalid and as such, I will group any further findings I find invalid here without providing a rationale in compliance with the relevant SC guidelines.

@c4-judge
Copy link

c4-judge commented Dec 6, 2023

alex-ppg marked the issue as primary issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working insufficient quality report This report is not of sufficient quality primary issue Highest quality submission among a set of duplicates unsatisfactory does not satisfy C4 submission criteria; not eligible for awards
Projects
None yet
Development

No branches or pull requests

4 participants