feat(solana): confirm space when creating accounts
What changed, and why it matters
This commit adds an on-screen confirmation step for the 'space' (data size) parameter when creating new Solana accounts on a Trezor device. Previously, this parameter was hidden from the user during Create Account instructions, even though it was already shown for a related 'Allocate' instruction. The change improves consistency and helps users spot transactions that request unexpectedly large storage allocations, which could be a sign of a malicious or misleading transaction.
Treat as a low-risk defensive hardening improvement. No urgent action required; ensure the change is included in release notes and regression-test Solana CreateAccount/CreateAccountWithSeed transaction flows to confirm the new prompt appears for non-zero space values and remains hidden for zero.
Security signals we found
UI confirmation of previously hidden transaction parameter
Parameter 'space' controls rent-exempt deposit and storage allocation
Changelog describes change as confirming non-zero space allocation
Aligns behavior with already-reviewed Allocate/AllocateWithSeed instructions
No code execution, parsing, or cryptographic changes
Evidence from the diff
The patch updates Solana instruction definitions so that the ‘space’ parameter of System Program instructions CreateAccount (index 0) and CreateAccountWithSeed (index 2) is displayed to the user as ‘Data size’ during transaction confirmation. It adds a UIProperty with default_value_to_hide=0, meaning the value is only shown when non-zero. The change is purely a UI/confirmation improvement; no cryptographic or parsing logic is modified. The changelog fragment explicitly frames this as a security-relevant addition: ‘Confirm non-zero space allocation when creating an account.’
Changed components
Trezor firmware Solana appcore/src/apps/solana/transaction/instructions.pycommon/defs/solana/programs.jsoncommon/defs/solana/programs.mdInspect captured patch +25 / −2
### common/defs/solana/programs.json
@@ -36,6 +36,11 @@
"account": "new_account",
"display_name": "Create account"
},
+ {
+ "parameter": "space",
+ "display_name": "Data size",
+ "default_value_to_hide": 0
+ },
{
"parameter": "owner",
"display_name": "Owner"
@@ -153,6 +158,11 @@
"account": "created_account",
"display_name": "Create account"
},
+ {
+ "parameter": "space",
+ "display_name": "Data size",
+ "default_value_to_hide": 0
+ },
{
"parameter": "owner",
"display_name": "Owner"
### common/defs/solana/programs.md
@@ -9,10 +9,10 @@ _This file is generated by `programs.md.mako` via `make solana_templates`, do no
| Label | Value | Type |
|-------|-------|------|
| Create account | `new_account` | `account` |
+| Data size | `space` | `u64` |
| Owner | `owner` | `pubkey` |
| Deposit | `lamports` | `lamports` |
| From | `funding_account` | `account` |
-| _(not shown)_ | `space` | `u64` |
### (1) Assign
@@ -34,12 +34,12 @@ _This file is generated by `programs.md.mako` via `make solana_templates`, do no
| Label | Value | Type |
|-------|-------|------|
| Create account | `created_account` | `account` |
+| Data size | `space` | `u64` |
| Owner | `owner` | `pubkey` |
| Deposit | `lamports` | `lamports` |
| From | `funding_account` | `account` |
| _(not shown)_ | `base` | `pubkey` |
| _(not shown)_ | `seed` | `string` |
-| _(not shown)_ | `space` | `u64` |
| _(not shown)_ | `base_account` | `account` |
### (4) Advance Nonce Account
### core/.changelog.d/+solana_create_space.added
@@ -0,0 +1 @@
+Solana: Confirm non-zero space allocation when creating an account.
### core/src/apps/solana/transaction/instructions.py
@@ -916,6 +916,12 @@ def get_instruction(
"Create account",
None,
),
+ UIProperty(
+ "space",
+ None,
+ "Data size",
+ 0,
+ ),
UIProperty(
"owner",
None,
@@ -1076,6 +1082,12 @@ def get_instruction(
"Create account",
None,
),
+ UIProperty(
+ "space",
+ None,
+ "Data size",
+ 0,
+ ),
UIProperty(
"owner",
None,Why this scored 37/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.