What changed, and why it matters
This commit changes how the Keystone hardware wallet limits the number of addresses that can be generated for Avalanche's X-Chain and P-Chain. Previously, these chains allowed up to 999,999,999 addresses. The fix caps them at 10 addresses (indices 0-9), matching a known limitation of Avalanche X/P chain address derivation. This is likely a correctness or compatibility fix rather than a direct security vulnerability, though allowing excessive addresses could theoretically cause user confusion or wallet compatibility issues.
No immediate security action required. Treat as a normal firmware correctness fix. If auditing, verify that the value 9 correctly matches Avalanche X/P chain BIP44/derivation conventions and that other chains with similar path-specific limits are consistently handled.
Security signals we found
UI-level input validation change
Address derivation path limit enforcement
No cryptographic code modified
No memory safety, authentication, or signing logic changed
Evidence from the diff
The patch introduces a new constant AVAX_X_P_ADDRESS_INDEX_MAX set to 9 and a new GetAvaxMaxAddressIndex() function. For Avalanche (HOME_WALLET_CARD_AVAX), when path index 1 is selected (X/P chain path), the maximum address index is now capped at 9 instead of the general 999,999,999 limit. Path index 0 retains the general limit. The change affects only the UI widget that controls address index selection for multi-path coin receive workflows.
Changed components
src/ui/gui_widgets/multi/web3/gui_multi_path_coin_receive_widgets.cAvalanche X/P chain receive address UIAvalanche address index selectionInspect captured patch +15 / −1
diff --git a/src/ui/gui_widgets/multi/web3/gui_multi_path_coin_receive_widgets.c b/src/ui/gui_widgets/multi/web3/gui_multi_path_coin_receive_widgets.c
index d8799cc..2cc3550 100644
--- a/src/ui/gui_widgets/multi/web3/gui_multi_path_coin_receive_widgets.c
+++ b/src/ui/gui_widgets/multi/web3/gui_multi_path_coin_receive_widgets.c
@@ -20,6 +20,7 @@
#include "gui_global_resources.h"
#define GENERAL_ADDRESS_INDEX_MAX (999999999)
+#define AVAX_X_P_ADDRESS_INDEX_MAX (9)
#define ETH_LEDGER_LIVE_ADDRESS_INDEX_MAX (9)
#define SOL_BIP44_ADDRESS_INDEX_MAX (49)
#define SOL_BIP44_ROOT_ADDRESS_INDEX_MAX (0)
@@ -944,6 +945,19 @@ static int GetEthMaxAddressIndex(void)
return GENERAL_ADDRESS_INDEX_MAX;
}
+static int GetAvaxMaxAddressIndex(void)
+{
+ switch (GetPathIndex()) {
+ case 0:
+ return GENERAL_ADDRESS_INDEX_MAX;
+ case 1:
+ return AVAX_X_P_ADDRESS_INDEX_MAX;
+ default:
+ break;
+ }
+ return GENERAL_ADDRESS_INDEX_MAX;
+}
+
static int GetSOLMaxAddressIndex(void)
{
switch (GetPathIndex()) {
@@ -967,7 +981,7 @@ static int GetMaxAddressIndex(void)
{
switch (g_chainCard) {
case HOME_WALLET_CARD_AVAX:
- return GENERAL_ADDRESS_INDEX_MAX;
+ return GetAvaxMaxAddressIndex();
case HOME_WALLET_CARD_ETH:
return GetEthMaxAddressIndex();
case HOME_WALLET_CARD_SOL:
Why this scored 29/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.