Permissions - return values not checked when sending ETH #329
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
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
ScopeLift
Vulnerability details
Impact
On lines 85 and 101, ETH is transferred using a
.call
to an address provided as an input, but there is no verification that the call call succeeded. This can result in a call toemergencyWithdrawGAS
orpartialWithdrawGAS
appearing successful but in reality it failed. This can happen when the provideddestination
address is a contract that cannot receive ETH, or if theamount
provided is larger than the contract's balanceProof of Concept
Enter the following in remix, deploy the
Receiver
contract, and send 1 ETH when deploying thePermissions
contract. CallemergencyWithdrawGAS
with the receiver address and you'll see it reverts. This would not be caught in the current codeTools Used
Remix
Recommended Mitigation Steps
In
emergencyWithdrawGAS
:And similar for
partialWithdrawGAS
The text was updated successfully, but these errors were encountered: