-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Issue Type
[x] bug report
[ ] feature request
Current Behavior
We can easily generate 2 transaction with different identifiers (keccak(txbytes)
) which both has equal structural hash (EIP-712) which signature schema is using.
At first it seems to be just bug. However as @pdobacz pointed out omgnetwork/elixir-omg#827 (comment) it has more serious security implications.
Including
- prove non-canonicality of the transaction
- challenge input piggybacking in IFE which prevents funds exit
Expected Behavior
Transactions with different identifiers MUST HAVE different hashes used in signing
Steps to Reproduce
- Create transaction without
metadata
- Create ☝️ corresponding transaction with
metadata = 0
(32-zero bytes) - These transactions differs on identifier and matches on struct hash
- Full output of error:
- Command that caused error:
- Code that caused error:
Limitation in EIP-712 implementation. 32-zero bytes are used for transaction's metadata when no metadata is contained
Suggested Fix
EIP-712 domain should specify 2 types of transactions
- with metadata
- without metadata
Structural hash calculation should identify which type of transaction is provided.
NOTE: We can also make metadata
field mandatory
Motivation for Change
Security issue
System Specs
Solidy 0.5
Elixir code changes tracked in elixir-omg#827
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working