38 / OpenZeppelin Contracts ECDSA bug
Investigating the ECDSA bug in OpenZeppelin Contracts and searching for vulnerabilities in smart contracts. Will a zero day be found?
Timeline
Participants
Episode notes
Edit these notes…- What is ECDSA?
- A public key and a private key
- Can be Eth address
- Sign a message with a private key, and anybody can verify against public key
- Sign a Eth TX or message
- The messages are used on smart contracts to denote authorization
- Sign a Eth TX or message
- Encrypt message with a public key, and decrypt with a private key
- Two types of encoding, 64-byte and 65-byte
- Either is accepted for verification in a smart contract
- A public key and a private key
- ECDSA signature malleability · Advisory · OpenZeppelin/openzeppelin-contracts https://github.com/OpenZeppelin/openzeppelin-contracts/secur lity/advisories/GHSA-4h98-2769-gh6h
- OZ mentioned
ecrecover
opcode malleability - OZ failed to mention the 64/65-bit malleability
- Reported other contracts affected ERC1271WalletMock and EIP712External
- OZ mentioned
- Should make signature acceptance injective rather than surjective
- Need better code search for live contracts!
- At least github search accepts “-” operators
- Potential issues with Github search operators for Stars & Forks
- Found a vulnerability in Zibert bridge (created Github issue) and Hive https://github.com/cent-inc/hive/issues/1