Closed c4-submissions closed 1 year ago
From the doc:
The Centrifuge Protocol is built on Centrifuge Chain, a layer 1 blockchain custom built for Real World Assets, using the Substrate framework. Key advantages of Substrate include shared security as a parachain, built-in on-chain governance and forkless upgrades, and trustless bridging with other parachains. These enable Centrifuge to focus on building Centrifuge Chain into the go-to place for bringing real world assets on-chain.
raymondfam marked the issue as low quality report
raymondfam marked the issue as primary issue
gzeon-c4 marked the issue as unsatisfactory: Out of scope
Lines of code
https://github.com/code-423n4/2023-09-centrifuge/blob/main/src/token/ERC20.sol#L42-L49
Vulnerability details
Impact
In the event of a hard fork, an attacker could reuse signatures to receive user funds on both chains.
Proof of Concept
At construction, the ERC20.sol contract computes the domain separator using the network’s chainID, which can be changed at the time of re-deployment. In the event of a post-deployment chain fork, the chainID of the network might not change enabling the signatures to be replayed across both versions of the chain.
However, the _isValidSignature function checks only the length of the signature which can be easily obtained. As a result, if a fork of a network is made after the contract’s creation, every signature will be usable in both forks.
Take the following scenario,
Tools Used
Manual Review
Recommended Mitigation Steps
Identify and document the risks associated with having forks of multiple chains and develop related mitigation strategies.
Assessed type
Upgradable