MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
12.01k stars 4.91k forks source link

[Bug]: Typed Data v4 signing not working with Trezor after 11.7.3 and 11.7.4 roll out #22665

Closed 0xGitGuy closed 9 months ago

0xGitGuy commented 9 months ago

Describe the bug

Signing with typed datav4 with trezor hw throws keyring controller error. Error is not present when non-trezor wallets are used. Did not update trezor firmware. Same firmware with 11.7.2 works fine:

(tested at https://metamask.github.io/test-dapp/ to be sure it's not dapp specific)

Result: Error: Keyring Controller signTypedMessage: Error: Invalid parameter "" (= {"path":"m/44'/60'/0'/0/3","data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Group":[{"name":"name","type":"string"},{"name":"members","type":"Person[]"}],"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person[]"},{"name":"contents","type":"string"},{"name":"attachment","type":"bytes"}],"Person":[{"name":"name","type":"string"},{"name":"wallets","type":"address[]"}]},"message":{"contents":"Hello, Bob!","from":{"name":"Cow","wallets":

This renders all permit signing on dapps not possible can could hinder withdrawal of funds or other actions.

Bug is not present in 11.7.2

Expected behavior

No error

Screenshots/Recordings

No response

Steps to reproduce

  1. Use metamask 11.7.3 or 11.7.4
  2. https://metamask.github.io/test-dapp/
  3. Sign the sample typed v4
  4. Error should appear after signing

Error messages or log output

Result: Error: Keyring Controller signTypedMessage: Error: Invalid parameter "" (= {"path":"m/44'/60'/0'/0/3","data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Group":[{"name":"name","type":"string"},{"name":"members","type":"Person[]"}],"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person[]"},{"name":"contents","type":"string"},{"name":"attachment","type":"bytes"}],"Person":[{"name":"name","type":"string"},{"name":"wallets","type":"address[]"}]},"message":{"contents":"Hello, Bob!","from":{"name":"Cow","wallets":

Version

11.7.3, 11.7.4

Build type

None

Browser

Brave

Operating system

Windows

Hardware wallet

Trezor

Additional context

No response

Severity

danjm commented 9 months ago

@0xGitGuy I am having trouble reproducing this. Which network were you on when you saw this bug? And what model of trezor are you using?

vania221 commented 9 months ago

Очікуємо подробиць для подальшого сортування. Незрозуміло, чи розбіжність у значеннях стосується лише маркера та/або мережі чи впливає на всіх користувачів. #1133

vivek-consensys commented 9 months ago

Unable to reproduce this issue, will be closing this ticket. If this issue arises again, we will revisit.

0xGitGuy commented 9 months ago

11.7.5 its resolved. Will monitor

vania221 commented 8 months ago

Signing with typed datav4 with trezor hw throws keyring controller error. Error is not present when non-trezor wallets are used. Did not update trezor firmware. Same firmware with 11.7.2 works fine:

(tested at https://metamask.github.io/test-dapp/ to be sure it's not dapp specific)

Result: Error: Keyring Controller signTypedMessage: Error: Invalid parameter "" (= {"path":"m/44'/60'/0'/0/3","data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Group":[{"name":"name","type":"string"},{"name":"members","type":"Person[]"}],"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person[]"},{"name":"contents","type":"string"},{"name":"attachment","type":"bytes"}],"Person":[{"name":"name","type":"string"},{"name":"wallets","type":"address[]"}]},"message":{"contents":"Hello, Bob!","from":{"name":"Cow","wallets":

This renders all permit signing on dapps not possible can could hinder withdrawal of funds or other actions.

Bug is not present in 11.7.2

Expected behavior

No error

Screenshots/Recordings

No response

Steps to reproduceUse metamask 11.7.3 or 11.7.4https://metamask.github.io/test-dapp/Sign the sample typed v4Error should appear after signingError messages or log output

Result: Error: Keyring Controller signTypedMessage: Error: Invalid parameter "" (= {"path":"m/44'/60'/0'/0/3","data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Group":[{"name":"name","type":"string"},{"name":"members","type":"Person[]"}],"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person[]"},{"name":"contents","type":"string"},{"name":"attachment","type":"bytes"}],"Person":[{"name":"name","type":"string"},{"name":"wallets","type":"address[]"}]},"message":{"contents":"Hello, Bob!","from":{"name":"Cow","wallets":

Version

11.7.3, 11.7.4

Build type

None

Browser

Brave

Operating system

Windows

Hardware wallet

Trezor

Additional context

No response

Severityusers who depend on permit signing to withdraw, move or swap funds will not be able to perform action if funds are on protocol that enforces typed v4 signing.

0xGitGuy commented 6 months ago

exact same issue happening again with latest 11.14.4. Can't sign transaction. Same errors.