-
Notifications
You must be signed in to change notification settings - Fork 2
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
QA Report #16
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
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
Feb 18, 2022
Duplicate of #119 |
moose-code
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 6, 2022
Not agreeing its a duplicate of #119 as it doesn't talk about ddos. Making this low. |
Since this issue was downgraded to a QA level, and the warden did not submit a separate QA report, we've renamed this one to "QA report" for consistency. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L48
https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L43
Vulnerability details
Impact
In VUSD.sol the mintWithReserve() and withdraw() functions both handle minting and burning of the vusd tokens. Both of these function don't require that the amount passed in is larger than 0 while still emitting an event through the open zepellin erc20 library. Leaving out this check can trick the protocol into thinking that funds were minted or burned when in fact they were not. This is especially important if the protocol will ever be relying on these events to make important decisions in the code.
Proof of Concept
https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L48
https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L43
Tools Used
Manual code review
Recommended Mitigation Steps
add to mintWithReserve() and withdraw() functions in VUSD.sol:
require(amount > 0, "Amount cannot be 0");
The text was updated successfully, but these errors were encountered: