Open hats-bug-reporter[bot] opened 5 months ago
It might be that the vaults are connected to different vaults on different chains, how would you check against that?
This is more of a social engineering type of issue, everybody can check for themselves the address of the legit vault they want to use.
Hi @reednaa I think we should verify that the vault hasn't been deployed on that chain before deploying it. We can use this bool in function deploy for it.
isCreatedByFactory[chainInterface][vault] = true;
If isCreatedByFactory is already set to true on that chain, then it has been deployed and we can revert with an error message e.g, "vault already deployed!"
Sorry, I don't understand.
It might be that the vaults are connected to different vaults on different chains, how would you check against that?
Let's recap The core problem is that the same vault can be deployed again on the same chain.
Your point is that the vault can be connected to different vaults on different chains.
I suggest we start by fixing the core issue, preventing duplicate vaults from existing on the same chain.
Thiis will also prevent malicious actors from deploying duplicate vaults of the original vault on each chain as only the first vault deployed by the genuine user on each chain will be valid
That's what I think we should do..
My argument is:
The vault that is WETH, USDC could be a single pool (not connected to any other vaults) or be in a larger pool, say connected to a vault on Polygon which is WMATIC, USDT. There is no way to know from a single chain.
How would you check the difference between these vaults?
Let's use the vault's name and symbol
string memory name,
string memory symbol,
Let the name and symbol of each vault be unique to that vault.
Wouldn't that allow someone to DoS pool creation? And, what if another vault matches the name but not symbol? They could even just add a space at the end to make them seem almost exact.
It seems there are many edge cases around this issue so it would be impossible to suggest just one fix to address all of them. If you have a better fix in mind, let's hear it.
My "fix" is not fixing. Like many things regarding Catalyst, sane off-chain UIs will show this for a user and as such it is a non-issue.
I suggest we go with my fix then, as both suggestions of:
Is a good step in the right direction of securing the protocol and users.
We have decided to classify this issue as won’t fix. Our decision is based on the following arguments:
According to these arguments, the issue is won’t fix.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x08845b1c7713d61ed63e6b4b5abbcbb128841c5beee32489382a954d6241c4a7 Severity: medium
Description: Description\ A deployed vault can be deployed again. This is due to a lack of validation to verify that the vault about to be deployed hasn't already been deployed before deploying it. This will lead to duplicate vaults.
Attack Scenario\ An adversary can exploit the vulnerability to create bad duplicates of an already exisiting good vault in order to tarnsih the vault's reputation. It can also be done to trick users into interacting with bad vaults.
Proof of Concept (PoC) File
Add this test to DeployVault.t.sol and run forge test --mt test_deploy_twice
Poc file attached below.
Proposed fix
Verify that the vault hasn't been deployed before deploying it.
Files: