feat(zcash): use raw firmware version in ZcashAccounts pairing QR
What changed, and why it matters
This commit changes how the Keystone hardware wallet reports its firmware version when pairing with Zcash wallets. Previously it used a function that returned a display-formatted version string (with a flavor suffix). Now it formats the raw major/minor/build numbers directly. The goal is to make the pairing QR code's version string match the version bytes stamped by the PCZT signer, so wallets can use one consistent minimum-version check. There is no direct security vulnerability in the diff itself; it is a compatibility/consistency fix.
Treat as a normal feature/compatibility commit. No security response required. If desired, verify that downstream Zcash wallets correctly parse the new raw version format and that the SOFTWARE_VERSION_* macros are consistently maintained.
Security signals we found
No buffer overflow: snprintf with sizeof(firmwareVersion) bounds output
No change to cryptographic material or key handling
No change to authorization or trust assumptions
Potential minor risk if version parsing on wallet side is sensitive to format, but commit explicitly aims to reduce format mismatch
No secrets, keys, or randomness introduced
Evidence from the diff
In GuiGetZecData(), the code replaces GetSoftWareVersionNumber(firmwareVersion) with an inline snprintf using SOFTWARE_VERSION_MAJOR, SOFTWARE_VERSION_MINOR, and SOFTWARE_VERSION_BUILD. The resulting string is passed into get_connect_zcash_wallet_ur() as the firmwareVersion field of the ZcashAccounts pairing QR. This aligns the QR’s version representation with the raw firmware version stamp used by the PCZT signer. The change is localized to Zcash wallet connection UI and does not alter memory allocation, buffer size, or cryptographic handling.
Changed components
src/ui/gui_widgets/multi/cypherpunk/gui_connect_wallet_widgets.cZcashAccounts pairing QR generationZcash wallet connection flowInspect captured patch +2 / −1
diff --git a/src/ui/gui_widgets/multi/cypherpunk/gui_connect_wallet_widgets.c b/src/ui/gui_widgets/multi/cypherpunk/gui_connect_wallet_widgets.c
index 5d9748f..f969e6c 100644
--- a/src/ui/gui_widgets/multi/cypherpunk/gui_connect_wallet_widgets.c
+++ b/src/ui/gui_widgets/multi/cypherpunk/gui_connect_wallet_widgets.c
@@ -367,7 +367,8 @@ UREncodeResult *GuiGetZecData(void)
data[0].key_name = GetWalletName();
data[0].index = 0;
char firmwareVersion[32];
- GetSoftWareVersionNumber(firmwareVersion);
+ snprintf(firmwareVersion, sizeof(firmwareVersion), "%d.%d.%d",
+ SOFTWARE_VERSION_MAJOR, SOFTWARE_VERSION_MINOR, SOFTWARE_VERSION_BUILD);
return get_connect_zcash_wallet_ur(sfp, 32, keys, firmwareVersion);
}
Why this scored 19/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.