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

Clear the output buffer when a PSBT field read is rejected

Public commit record

What the developer wrote

Authored by Salvatore Ingala

65/100 · Adequate
Clear the output buffer when a PSBT field read is rejected

This avoids leaving host-controlled bytes in memory in cases of
failure.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit fixes a security hygiene issue in Ledger's Bitcoin app when reading PSBT (Partially Signed Bitcoin Transaction) data fields. Previously, if a field was missing or malformed, the memory buffer meant to hold the field value could be left containing leftover or partially written data controlled by the host/device communicating with the Ledger. The change ensures the buffer is explicitly wiped to zero and its reported length is reset in those failure cases, so callers cannot accidentally use stale or incorrect data. The commit message itself states this avoids leaving 'host-controlled bytes in memory in cases of failure.'

Recommended action

Treat as a security-hardening fix with potential information-disclosure/use-of-stale-data implications. Review whether any callers of these PSBT field helpers previously relied on buffer contents after an ABSENT/ERROR status, and ensure the fix is included in the next release. No immediate emergency response is indicated, but the change should be merged and regression-tested.

Security signals we found

01

explicit_bzero added to clear output buffer on failure paths

02

length out-parameter reset to 0 on failure paths

03

commit message explicitly describes avoiding host-controlled bytes remaining in memory on failure

04

unit tests added/updated to assert buffer clearing on rejected reads

05

failure to clear buffers could lead to use of stale or partially attacker-controlled data

Risk score

Why this scored 52/100

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