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

mnemonic: gracefully handle invalid bcur-bip39 mnemonics, improve tests

Public commit record

What the developer wrote

Authored by Jon Griffiths

91/100 · Strong
mnemonic: gracefully handle invalid bcur-bip39 mnemonics, improve tests

- Show an error rather than asserting when importing an invalid mnemonic
- Reduce stack usage when parsing
- Reject clearly malformed mnemonics early
- Simplify code and share related constants

Suggested-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This update fixes how Blockstream Jade handles QR-code-based recovery phrases imported in a specific format (bcur-bip39). Previously, a malformed or invalid recovery phrase could crash the device because the code used internal 'assert' checks that halt the device when they fail. The patch replaces those hard crashes with proper error handling, rejects obviously wrong inputs earlier (wrong number of words, words that are too long, empty words), and reduces memory used on the stack. It also adds tests for bad inputs. In practical terms, scanning a bad wallet QR code is now more likely to show a user-friendly error instead of freezing or rebooting the device.

Recommended action

Treat as a hardening/security fix and include in the next firmware release. Users should update Jade firmware once available. Developers should verify that other mnemonic import paths (compactseedqr, seedqr, prefix expansion) similarly avoid assertion failures on malformed input and that the reduced buffer size does not break any valid 24-word mnemonic edge cases.

Security signals we found

01

Replaces assertion failures with controlled error returns on malformed mnemonic input

02

Adds input validation for word count, word length, and empty words in bcur-bip39 parser

03

Reduces stack buffer size for mnemonic handling

04

Adds regression tests for invalid bcur-bip39 mnemonics

05

Suggested-by external contributor Jordan Mecom via odo repository

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/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.