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

Reject 0x80000000 as an unhardened step in wallet policy parsing

Public commit record

What the developer wrote

Authored by Salvatore Ingala

73/100 · Adequate
Reject 0x80000000 as an unhardened step in wallet policy parsing

2147483648 must be rejected, as it would result in an hardened
derivation step, which is no acceptable in BIP-388 (and would
later fail address derivation and signing).
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a boundary-check bug in how the Ledger Bitcoin app parses wallet policies (BIP-388). The app was supposed to reject any hardened derivation step in a specific range expression, but it allowed the value 2147483648 (0x80000000) because the check used 'greater than' instead of 'greater than or equal to'. That value actually represents a hardened step, which is forbidden here. The fix changes the comparison so 0x80000000 is correctly rejected. If accepted, it could later cause address derivation or signing to fail or behave unexpectedly.

Recommended action

Treat as a security-relevant correctness fix. Review whether any downstream code could be reached with 0x80000000 before this patch, and confirm that the rejection path is exercised by tests. Consider adding regression tests for boundary values 0x7FFFFFFF and 0x80000000 in /<M;N>/* parsing.

Security signals we found

01

Off-by-one boundary check in BIP-388 wallet policy parsing

02

Forbidden hardened derivation index accepted as unhardened

03

Potential failure or incorrect behavior in address derivation and signing

04

Input validation weakness in key expression range parsing

Risk score

Why this scored 60/100

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