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

Splitting up MAX_BIP388_XPUB_DERIVATION_STEPS and MAX_BIP32_PATH_STEPS

Public commit record

What the developer wrote

Authored by Ilya Artemov

50/100 · Thin
Splitting up MAX_BIP388_XPUB_DERIVATION_STEPS and MAX_BIP32_PATH_STEPS
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit renames and splits two related constants for Bitcoin derivation paths. Previously, the same limit was used both for wallet-policy xpub derivations and for full signing paths. The change gives xpub derivations their own smaller limit (8 steps) while keeping the full signing path limit at 10 steps (8 + 2 for change/address index). It also fixes a potential off-by-one check when parsing xpub derivations by changing '>' to '>='. Most of the file changes are cosmetic whitespace removals.

Recommended action

Treat as a defensive hardening/refactoring patch. Review whether any downstream code assumes MAX_BIP32_PATH_STEPS == MAX_BIP388_XPUB_DERIVATION_STEPS, and verify the static assert holds across SDK versions. No urgent action required absent additional vulnerability evidence.

Security signals we found

01

Off-by-one hardening in derivation-step parsing (wallet.c: '>' changed to '>=')

02

Separation of xpub derivation limit from full signing-path limit to reduce buffer sizing confusion

03

Static assertion tying MAX_BIP32_PATH_STEPS to SDK MAX_BIP32_PATH

04

Array size in wallet.h reduced from MAX_BIP32_PATH_STEPS to MAX_BIP388_XPUB_DERIVATION_STEPS

Risk score

Why this scored 33/100

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