-
Notifications
You must be signed in to change notification settings - Fork 1
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
No security checks in VRF might lead to compromised results #445
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-c
primary issue
Highest quality submission among a set of duplicates
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
code423n4
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
labels
Mar 9, 2023
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
labels
Mar 10, 2023
thereksfour changed the severity to 2 (Med Risk) |
thereksfour marked the issue as primary issue |
c4-judge
added
the
primary issue
Highest quality submission among a set of duplicates
label
Mar 10, 2023
Implementation does not meet chainlink documentation requirements |
This was referenced Mar 10, 2023
Closed
This was referenced Mar 12, 2023
|
c4-sponsor
added
the
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
label
Mar 14, 2023
TutaRicky marked the issue as sponsor disputed |
c4-judge
added
the
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
label
Mar 14, 2023
thereksfour marked the issue as unsatisfactory: |
c4-judge
added
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
and removed
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
labels
Mar 21, 2023
thereksfour changed the severity to QA (Quality Assurance) |
thereksfour marked the issue as grade-c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-c
primary issue
Highest quality submission among a set of duplicates
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-03-wenwin/blob/91b89482aaedf8b8feb73c771d11c257eed997e8/src/VRFv2RNSource.sol#L32-L38
https://github.com/code-423n4/2023-03-wenwin/blob/91b89482aaedf8b8feb73c771d11c257eed997e8/src/RNSourceBase.sol#L17-L30
Vulnerability details
Impact
External actors such as Blockchain miners/validators could influence the randomness results.
Proof of Concept
This is part of the chainlink docs --> https://docs.chain.link/vrf/v2/security as they own against such an attack.
Inside the code, the requestRandomNumber()[https://github.com/code-423n4/2023-03-wenwin/blob/91b89482aaedf8b8feb73c771d11c257eed997e8/src/RNSourceBase.sol#L17-L30] function could be called as many times as possible which is against chainkLink security practices as for example, the requests A,B,C will not necessary come in the order the have been called, the contract must validate them based on their request id.
Also in contradictory with chainLink security standards, there is no safe block confirmation time --> https://docs.chain.link/vrf/v2/security#choose-a-safe-block-confirmation-time-which-will-vary-between-blockchains , as this could allow to miners/validators of the underlying blockchain to perform an attack where they would rewrite the chain’s history as they please to facilitate their winnings
Tools Used
Manual review, Chainlink docs
Recommended Mitigation Steps
Possible mitigation steps:
The text was updated successfully, but these errors were encountered: