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

Require exactly 32 bytes for PSBT_IN_PREVIOUS_TXID

Public commit record

What the developer wrote

Authored by Salvatore Ingala

65/100 · Adequate
Require exactly 32 bytes for PSBT_IN_PREVIOUS_TXID

Values of length different than 32 should in fact be rejected.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit tightens validation of a Bitcoin transaction signing field. The Ledger app previously accepted any non-error value when reading the PSBT_IN_PREVIOUS_TXID field, even if it was shorter or longer than the required 32 bytes. Now it rejects any length other than exactly 32 bytes. An incorrect txid length could let a malformed or malicious PSBT misrepresent which previous transaction is being spent, potentially leading to signing the wrong transaction data.

Recommended action

Treat this as a security-hardening fix and include it in the next release. Review whether other PSBT map-value reads in the same file and related sign_psbt handlers also enforce exact expected lengths rather than just non-error returns. Consider adding test vectors with malformed PSBT_IN_PREVIOUS_TXID lengths (0, 31, 33, 64 bytes).

Security signals we found

01

Input validation bypass: length check was too permissive for a cryptographic identifier

02

PSBT parsing: previous txid field length not enforced to match SHA256d transaction hash size

03

Potential mismatch between claimed prevout and non-witness UTXO data

04

Patch is a strict length-equality fix, not a refactor

Risk score

Why this scored 65/100

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