What changed, and why it matters
This commit fixes a bug in the Ethereum 'clear signing' feature on Trezor hardware wallets. A value that could arrive as true/false was not being converted to a number (1/0) before being looked up, which caused clear signing to fail and forced the wallet to fall back to 'blind signing' for Lido transactions. Blind signing means the user cannot see what the transaction actually does, which is a security-relevant degradation. The commit also adds a placeholder for chain_id support and trims an explanatory comment.
Treat this as a security-hardening bugfix. Verify that the bool-to-int conversion covers all enum-format cases, add regression tests for boolean enum values, and confirm that the Lido clear-signing path now displays decoded fields instead of falling back to blind signing. Consider whether other formatters have similar type-handling gaps.
Security signals we found
Bugfix in parser that caused fallback to blind signing for LiDo transactions
Blind signing reduces transaction transparency and increases phishing/social-engineering risk
Boolean-to-integer conversion omission in enum formatter
Clear signing feature is a security UX feature, so its failure is security-relevant
Evidence from the diff
In core/src/apps/ethereum/clear_signing.py, the enum formatter now converts bool values to int before using them as dictionary keys. Without this, a boolean token value raised InvalidFormatDefinition, which in turn caused clear signing to abort and the device to blind-sign the transaction. The commit also adds ContainerPath.ChainId = 4 (marked TODO) and shortens the comment in sign_tx.py about why large calldata disables clear signing.
Changed components
core/src/apps/ethereum/clear_signing.pycore/src/apps/ethereum/sign_tx.pyTrezor Ethereum clear signing / ERC-20 token transaction confirmation flowInspect captured patch +4 / −3
### core/src/apps/ethereum/clear_signing.py
@@ -613,6 +613,8 @@ async def format(
if isinstance(value, (bytes, bytearray)):
# byte sliced to be read as an int
value = int.from_bytes(value, "big")
+ if isinstance(value, bool):
+ value = int(value)
if type(value) is not int:
raise InvalidFormatDefinition
formatted = self.entries.get(value)
@@ -869,6 +871,7 @@ class ContainerPath:
From = 1
Value = 2
To = 3
+ ChainId = 4 # TODO
class FieldDefinition:
### core/src/apps/ethereum/sign_tx.py
@@ -171,9 +171,7 @@ async def confirm_tx_data(
value = int.from_bytes(msg.value, "big")
if len(initial_data) < data_length:
- # Don't even attempt to clear sign if we have a calldata larger than `MAX_DATA_STORED`.
- # this is because clear signing doesn't currently support fetching additional data,
- # which is because if it did, we would not be able to fall back to blind signing anymore.
+ # Clear signing applet cannot stream data yet.
clear_signed = False
else:
try:Why this scored 62/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.