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

Owner rug vector in adminWriteBathToken() #385

Closed
code423n4 opened this issue May 28, 2022 · 3 comments
Closed

Owner rug vector in adminWriteBathToken() #385

code423n4 opened this issue May 28, 2022 · 3 comments
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 duplicate This issue or pull request already exists sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-rubicon/blob/8c312a63a91193c6a192a9aab44ff980fbfd7741/contracts/rubiconPools/BathHouse.sol#L217-L229

Vulnerability details

Impact

The migration function BathHouse.adminWriteBathToken() provides a rug vector for the admin of the protocol. They are able to receive deposits of underlying token and then switch the bath token contract associated with the underlying token to any contract they desire.

Tools Used

Manual review

Recommended Mitigation Steps

The presence of this function poses a security risk to the users of the protocol. Perhaps migration steps can be completed through a proposal process instead of at will by the owner of the protocol.

@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels May 28, 2022
code423n4 added a commit that referenced this issue May 28, 2022
@bghughes bghughes added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Jun 3, 2022
@bghughes
Copy link
Collaborator

bghughes commented Jun 3, 2022

Centralization risk is acknowledged #344

@pauliax
Copy link

pauliax commented Jun 7, 2022

I think it was explicitly mentioned that v1 will be a centralized system, and later steps will be taken to improve decentralization: "BathHouse has an admin that is the EOA administrator of the entire protocol in v1."

Thus, I think it is still an issue but definitely not of high severity.

@HickupHH3 HickupHH3 added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 3 (High Risk) Assets can be stolen/lost/compromised directly labels Jun 17, 2022
@HickupHH3 HickupHH3 added duplicate This issue or pull request already exists 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value and removed QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Jun 17, 2022
@HickupHH3
Copy link
Collaborator

Duplicate of #249

@HickupHH3 HickupHH3 marked this as a duplicate of #249 Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 duplicate This issue or pull request already exists sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

4 participants