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

Add missing bound check in fpt_der_data_callback

Public commit record

What the developer wrote

Authored by Salvatore Ingala

45/100 · Thin
Add missing bound check in fpt_der_data_callback
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a missing safety check in the Ledger Bitcoin app when reading BIP32 derivation data from a PSBT (Partially Signed Bitcoin Transaction). For non-Taproot transactions, the app was not verifying that the derivation data was not longer than the maximum supported size before copying it into a fixed-size internal buffer. This could allow a malicious or malformed PSBT to overflow that buffer, potentially corrupting memory and affecting the device's behavior during transaction signing.

Recommended action

Apply this patch and review adjacent PSBT parsing code for similar missing length validations, especially where externally controlled length values are used to size or index into fixed buffers. Consider fuzzing PSBT derivation fields and running static analysis for buffer bounds.

Security signals we found

01

Missing bounds check on externally supplied length field

02

Potential buffer overflow in fixed-size output buffer during PSBT parsing

03

Fix adds explicit length validation before memory copy preparation

04

Error path sets result code and returns early rather than continuing

Risk score

Why this scored 60/100

Our methodology →
Potential impact 18/30
Exploitability 14/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.