AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
High 76 Bitcoin

fix(solana): show optional instruction params by default

Public commit record

What the developer wrote

Authored by Jakub Janků

100/100 · Strong
fix(solana): show optional instruction params by default

Prior to this change, optional params of the instructions of the
recognized Solana programs were never displayed when their value is
None, even though None may encode an action rather than the absence
of one.

This commit changes the confirmation code so that optional params of
the value None are always displayed unless they are hidden using a
special new modifier "default_value_to_hide": "none".

Both semantics None can have are present in the affected
instructions. In the SetAuthority instructions of the Token programs,
None is an action: it unsets the authority, usually irreversibly. It
is now displayed, so the user can distinguish removing the authority
from setting it to themselves (the latter is hidden as a safe
default). In the SetLockup instructions of the Stake program, None
means the field is left unchanged, so it is hidden using the "none"
modifier. A lockup timestamp or epoch of 0, previously hidden as a
default value, is a real value that clears the lockup constraint and
is now displayed.

Set lockup impl:
https://github.com/solana-program/stake/blob/68217e1e5e17d495280ef9e12243c7ebbe6e1710/interface/src/state.rs#L525-L551

Set authority impl:
https://github.com/solana-program/token-2022/blob/426400f29d5f1e299be8b353fdf13f22358fbd68/program/src/processor.rs#L709-L1025

Partially fixes: https://github.com/satoshilabs/trezor-firmware/issues/325

(cherry picked from commit 6058377602f6989c58bbe599aa0e5c5e85324ce4)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This update fixes a security issue in Trezor's Solana transaction signing where important instruction details were hidden from the user. Previously, when a Solana instruction had an optional parameter set to 'None', Trezor simply did not show it at all. But 'None' can sometimes mean something important, like permanently removing an authority, not just 'nothing happens.' After the fix, Trezor now shows 'None' to the user by default, unless the developers explicitly mark that parameter as safe to hide. This helps prevent users from unknowingly approving destructive actions, such as removing their own control over tokens or clearing stake account lockups.

Recommended action

Treat this commit as a security fix. Ensure the firmware release containing it is deployed to users. Review other blockchain apps in the Trezor codebase for similar patterns where None or default values are silently hidden from confirmation screens. Verify that the new 'none' modifier is applied only where None truly means 'no change' and not to destructive None values.

Security signals we found

01

UI confirmation bypass: optional parameters with None value were silently omitted from user review

02

Semantic ambiguity of None: treated as absence-of-value when it can encode a destructive action

03

Irreversible operation hidden: SetAuthority with None new_authority removes authority without user visibility

04

Real zero values hidden: SetLockup timestamp/epoch of 0 clears lockup but was treated as default/safe

05

New safe-hide modifier introduced: 'default_value_to_hide': 'none' to explicitly suppress non-action None values

06

Changelog/security entry present: core/.changelog.d/+solana_optional_params.security

07

Test fixtures added for both destructive and no-change None semantics

Risk score

Why this scored 76/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 12/15
Affected reach 10/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.