Skip to content
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

loss of funds due to accidental transfer of ETH #269

Closed
code423n4 opened this issue Jun 19, 2022 · 5 comments
Closed

loss of funds due to accidental transfer of ETH #269

code423n4 opened this issue Jun 19, 2022 · 5 comments
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

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-06-connext/blob/b4532655071566b33c41eac46e75be29b4a381ed/contracts/contracts/core/promise/PromiseRouter.sol#L132

Vulnerability details

Issue: a relayer or other component can send ETH to PromiseRouter.sol by mistake.

Consequences: this will lead to loss of funds since there is no function to withdraw the ETH.

Affected Code

File: PromiseRouter.sol
131:   // ======== Receive =======
132:   receive() external payable {}

Recommended Mitigation Steps

Add a withdrawEth function, where onlyOwner can withdraw ETH that is not part of the fees.

@code423n4 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 Jun 19, 2022
code423n4 added a commit that referenced this issue Jun 19, 2022
@jakekidd jakekidd added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Jun 24, 2022
@jakekidd
Copy link
Collaborator

Note: it may also be possible to simply remove the payable receive method here. Worth handling either way.

@jakekidd jakekidd added sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") and removed sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels Jun 24, 2022
@LayneHaber
Copy link
Collaborator

Duplicate of #67

@LayneHaber LayneHaber marked this as a duplicate of #67 Jun 30, 2022
@LayneHaber LayneHaber added duplicate This issue or pull request already exists and removed sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") labels Jun 30, 2022
@0xleastwood
Copy link
Collaborator

Anyone can "accidentally" transfer ETH to a contract. Downgrading to QA.

@0xleastwood
Copy link
Collaborator

There is no path of exploit so this issue is really just a best practice.

@0xleastwood 0xleastwood 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 Aug 14, 2022
@0xleastwood
Copy link
Collaborator

Merging with #263.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants