PromiseRouter
is prone to lock user's ether by mistake
#67
Labels
bug
Something isn't working
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 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-06-connext/blob/20f86d58444d7c8178735ada7e456a3112116e54/contracts/contracts/core/promise/PromiseRouter.sol#L132
Vulnerability details
Impact
PromiseRouter
is prone to lock user ether by mistake.Proof of Concept
The only way for the
PromiseRouter
contract to send the ether is through theprocess
method, only thebumpCallbackFee
andinitCallbackFee
methods control that the deposit of the ether is registered in order to return it, so if a user sends ether to the contract usingreceive
method, this ether cannot be returned to the user, and it will be locked forever.Is not a good practice to have a receive method if is not used.
Affected source code:
Recommended Mitigation Steps
I recommend to remove the
receive
method.The text was updated successfully, but these errors were encountered: