What changed, and why it matters
This commit is a build-system fix, not a security patch. It wraps a Zcash-related condition in a compile-time feature flag so that firmware builds that do not include the Web3 feature can compile. There is no direct evidence in the commit that this change fixes a vulnerability; it appears intended to restore continuous integration builds.
No security action required. Treat as a normal build fix. If reviewing for broader correctness, verify that non-Web3 builds intentionally omit Zcash transparent legacy support for SLIP39 wallets.
Security signals we found
No security-relevant keywords in commit title or message
Change is purely conditional compilation scaffolding
No bounds checks, memory handling, or cryptographic operations modified
No vendor disclosure or advisory referenced
Evidence from the diff
The change wraps the expression g_chainTable[i].chain == XPUB_TYPE_ZEC_TRANSPARENT_LEGACY inside #ifdef WEB3_VERSION ... #endif in two functions (AccountPublicSavePublicInfo and TempAccountPublicInfo). This prevents an undefined symbol/reference error when WEB3_VERSION is not defined at compile time. The logic for SLIP39 wallets otherwise remains unchanged when WEB3_VERSION is enabled.
Changed components
src/crypto/account_public_info.cSLIP39 wallet public key generation pathZcash transparent legacy xpub handling (Web3 builds only)Inspect captured patch +10 / −2
diff --git a/src/crypto/account_public_info.c b/src/crypto/account_public_info.c
index dd22f4e..f66976b 100644
--- a/src/crypto/account_public_info.c
+++ b/src/crypto/account_public_info.c
@@ -913,7 +913,11 @@ int32_t AccountPublicSavePublicInfo(uint8_t accountIndex, const char *password,
// slip39 wallet does not support:
// ADA
// Zcash
- if (isSlip39 && (g_chainTable[i].cryptoKey == LEDGER_BITBOX02 || g_chainTable[i].cryptoKey == ZCASH_UFVK_ENCRYPTED || g_chainTable[i].chain == XPUB_TYPE_ZEC_TRANSPARENT_LEGACY)) {
+ if (isSlip39 && (g_chainTable[i].cryptoKey == LEDGER_BITBOX02 || g_chainTable[i].cryptoKey == ZCASH_UFVK_ENCRYPTED
+#ifdef WEB3_VERSION
+ || g_chainTable[i].chain == XPUB_TYPE_ZEC_TRANSPARENT_LEGACY
+#endif
+ )) {
continue;
}
// do not generate public keys for ton-only wallet;
@@ -1081,7 +1085,11 @@ int32_t TempAccountPublicInfo(uint8_t accountIndex, const char *password, bool s
}
for (i = 0; i < NUMBER_OF_ARRAYS(g_chainTable); i++) {
- if (isSlip39 && (g_chainTable[i].cryptoKey == LEDGER_BITBOX02 || g_chainTable[i].cryptoKey == ZCASH_UFVK_ENCRYPTED || g_chainTable[i].chain == XPUB_TYPE_ZEC_TRANSPARENT_LEGACY)) {
+ if (isSlip39 && (g_chainTable[i].cryptoKey == LEDGER_BITBOX02 || g_chainTable[i].cryptoKey == ZCASH_UFVK_ENCRYPTED
+#ifdef WEB3_VERSION
+ || g_chainTable[i].chain == XPUB_TYPE_ZEC_TRANSPARENT_LEGACY
+#endif
+ )) {
continue;
}
if (g_chainTable[i].cryptoKey == TON_CHECKSUM || g_chainTable[i].cryptoKey == TON_NATIVE) {
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.