In function withdrawExpired() of AuraMerkleDrop, don't consider pendingPenalty, and withdraw all the amounts. #316
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraMerkleDrop.sol#L96-L102
Vulnerability details
Impact
function
withdrawExpired()
supposed to withdraw expired airdrops that users didn't withdraw them. but it withdraws all the balance of contract and don't considerpendingPenalty
which is belong to system and should be transferred topenaltyForwarder
.Proof of Concept
This is
withdrawExpired
code inAuraMerkleDrop
:As you can see it transfers all the balance of contract in
aura
token. but some of that balance could be penalty which most send topenaltyForwarder
.Tools Used
VIM
Recommended Mitigation Steps
first call
forwardPenalty()
inwithdrawExpired()
or subtractpendingPenalty
fromaura.balanceOf(address(this))
when withdrawing.The text was updated successfully, but these errors were encountered: