ethereum / ethereum/ERCs

Add Warnings in ERC-6492 Implementation

Open
#877 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
Solidity
Stars
756
Forks
1.1k
Avg merge
2d 20h
Merged PRs (30d)
14

Description

### Summary

> Since the exploit vector is publicly known, I consider the risk of discussing this matter openly to be low. Therefore, I'm opening a standard issue.

Last week a contract was [exploited](https://x.com/Phalcon_xyz/status/1882630151583981787) using the [ERC-6492 reference implementation](https://eips.ethereum.org/EIPS/eip-6492#reference-implementation). An exemplary exploit contract can be retrieved [here](https://github.com/0xGreed/odos_exploit/blob/6b683cc676aa62797fb2870302b070446b60a2e0/test/OdosExploit.t.sol#L44-L68). So the major issue (apart from inheriting the implementation, which you should not do) is the combination of the identity precompile located at address `0x04` in combination with ERC-6492. Please note that there is an [EIP proposal](https://eips.ethereum.org/EIPS/eip-7666) to replace the identity precompile with EVM code which we might can leverage in the future.

### Actions to Discuss

- Add a warning that the universal verifier should not be inherited.
- We need to add a warning to the current [ERC-6492 reference implementation](https://eips.ethereum.org/EIPS/eip-6492#reference-implementation) regarding the usage of `_signer = address(0x04)` (and the combination with arbitrary calls). We could even go a step further, and either disallow that specific precompile address `0x04` or the full [precompile address range](https://eips.ethereum.org/EIPS/eip-1352): `0x00` - `address(2**16-1)`.
- Do we see any impacts of the newly discovered attack vector for [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) implementations?

Cc: @Ivshti @Agusx1211

h/t goes to @0xkarmacoma for raising this issue with me.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the ERC-6492 reference implementation, the linked OdosExploit.t.sol example, and the ERC-1271 implementation question. Determine whether the requested outcome is warnings, rejecting address 0x04 or the precompile range, and an ERC-1271 impact assessment; done requires agreement on scope and documented, reviewed guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.