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

Fix issues with the communication protocol when data is chunked

Public commit record

What the developer wrote

Authored by Salvatore Ingala

73/100 · Adequate
Fix issues with the communication protocol when data is chunked

- get_merkle_preimage failed to update the data_ptr pointer
- fpt_der_data_callback would read corrupted data if a zero-length
chunk (or one starting with a very large varint that does not fit
in the first chunk) is received.
✓ 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 two bugs in the Ledger Bitcoin app's data-receiving code when large messages are split into multiple chunks. One bug caused the app to hash and copy from the wrong memory location after the first chunk, potentially corrupting a cryptographic proof. The other bug could read corrupted data or behave incorrectly if an empty chunk arrived, or if a taproot PSBT field started with a very large variable-length integer. These are memory/data-integrity issues in security-critical signing code, but the commit does not state they are exploitable for theft.

Recommended action

Treat as a security-relevant bugfix and include in the next firmware/app release. Review other chunked-callback handlers for similar stale-pointer and empty-chunk issues. Add regression tests covering multi-chunk, empty-chunk, and boundary-condition inputs for both components. Consider whether the merkle_preimage corruption could affect transaction validation and assess for a coordinated disclosure if a practical exploit path is found.

Security signals we found

01

Memory/data pointer not updated across chunked reads

02

Potential hash of incorrect/corrupted preimage data

03

Zero-length chunk handling gap

04

Varint parsing across chunk boundaries replaced with fixed-size read

05

Off-by-one correction in memmove offset

06

Security-critical code path: PSBT BIP32 derivation extraction during signing

Risk score

Why this scored 71/100

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