-
Notifications
You must be signed in to change notification settings - Fork 0
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
VRFNFTRandomDraw admin can prevent created or started raffle from taking place #101
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
downgraded by judge
Judge downgraded the risk level of this issue
M-02
primary issue
Highest quality submission among a set of duplicates
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Comments
code423n4
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
Dec 15, 2022
gzeon-c4 marked the issue as duplicate of #194 |
c4-judge
added
the
selected for report
This submission will be included/highlighted in the audit report
label
Jan 16, 2023
gzeon-c4 marked the issue as selected for report |
c4-judge
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
and removed
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
labels
Jan 16, 2023
gzeon-c4 changed the severity to 3 (High Risk) |
c4-judge
added
the
satisfactory
satisfies C4 submission criteria; eligible for awards
label
Jan 23, 2023
gzeon-c4 marked the issue as satisfactory |
c4-judge
added
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
downgraded by judge
Judge downgraded the risk level of this issue
and removed
3 (High Risk)
Assets can be stolen/lost/compromised directly
upgraded by judge
Original issue severity upgraded from QA/Gas by judge
labels
Jan 23, 2023
gzeon-c4 changed the severity to 2 (Med Risk) |
C4-Staff
removed
selected for report
This submission will be included/highlighted in the audit report
duplicate-194
labels
Jan 24, 2023
captainmangoC4 marked the issue as primary |
C4-Staff
added
selected for report
This submission will be included/highlighted in the audit report
primary issue
Highest quality submission among a set of duplicates
M-02
labels
Jan 24, 2023
Per discussion with @iainnash - adding the |
liveactionllama
added
the
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
label
Feb 28, 2023
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
downgraded by judge
Judge downgraded the risk level of this issue
M-02
primary issue
Highest quality submission among a set of duplicates
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-12-forgeries/blob/fc271cf20c05ce857d967728edfb368c58881d85/src/VRFNFTRandomDraw.sol#L173
https://github.com/code-423n4/2022-12-forgeries/blob/fc271cf20c05ce857d967728edfb368c58881d85/src/VRFNFTRandomDraw.sol#L162-L168
Vulnerability details
Impact
The admin/owner of
VRFNFTRandomDraw
canstartDraw()
a raffle, including emitting theSetupDraw
event, but in a way that ensuresfulfillRandomWords()
is never called. For example:keyHash
is not validated withincoordinator.requestRandomWords()
. Providing an invalidkeyHash
will allow the raffle to start but prevent the oracle from actually supplying a random value to determine the raffle result.fulfillRandomWords()
.In addition, the owner/admin could simply avoid ever calling
startDraw()
in the first place.Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Tools Used
Recommended Mitigation Steps
Depending on the desired functionality with respect to the raffle owner, a successful callback to
fulfillRandomWords()
could be a precondition of the admin/owner reclaiming the reward NFT. This would help ensure the owner does not create raffles that they intend will never pay out a reward.The text was updated successfully, but these errors were encountered: