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

Add missing length validation for V2 wallet policies

Public commit record

What the developer wrote

Authored by Salvatore Ingala

73/100 · Adequate
Add missing length validation for V2 wallet policies

With V2 wallet policies, the preimage of the wallet policy is
requested after the wallet poicy header, which already declares its
length. Therefore, the length of the preimage should always match.

Thanks to Rob Hamilton for the bug report.
✓ 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 missing safety check in Ledger's Bitcoin app when handling newer 'V2 wallet policies.' The app was told in advance how long the wallet policy data should be, but it never verified that the actual data matched that length. The fix adds a simple comparison: if the lengths don't match, the app now rejects the request. The commit credits Rob Hamilton for reporting the bug, but no public security advisory or CVE is included in the materials.

Recommended action

Treat as a security hardening fix with possible memory-safety or parsing-integrity implications. Review whether the missing check could have led to out-of-bounds reads, truncated policy parsing, or unexpected behavior in downstream signing logic. No CVE or advisory is supplied; consider whether one should be requested from Ledger.

Security signals we found

01

Missing input length validation in cryptographic/security parsing path

02

Potential parsing desynchronization between header length field and actual preimage length

03

Fix explicitly credited to external bug reporter (Rob Hamilton)

04

Small, targeted patch in a single security-critical source file

Risk score

Why this scored 58/100

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