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

sign_psbt: fail before the UI if the MuSig2 session is missing

Public commit record

What the developer wrote

Authored by Salvatore Ingala

73/100 · Adequate
sign_psbt: fail before the UI if the MuSig2 session is missing

In MuSig2 round 2, the session was only looked up while signing, after the
user had already reviewed and approved the transaction; a missing session
then resulted in an error, and in a "Transaction rejected" screen.

With pubnonces generated in advance, a missing session is an expected case
(for example, it was evicted when the storage was full). The session id only
depends on the wallet policy and on the MUSIG2_SESSION_ID, so its existence
is now checked before the transaction is shown, without deleting it or
accessing its content if present.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit improves the user experience and error handling for Ledger's Bitcoin app when using MuSig2 multi-signatures. Previously, if a required MuSig2 session was missing during the second round of signing, the device would only report the error after the user had already reviewed and approved the transaction on screen, causing a confusing 'Transaction rejected' message. Now, the app checks for the session before showing the transaction to the user, so it fails earlier and more clearly. There is no direct evidence this fixes a security vulnerability, but it reduces the chance of user confusion and wasted approvals.

Recommended action

Treat as a routine quality/UX improvement. No urgent security response is indicated by the diff alone. If maintaining this app, ensure the new error code is documented in client integrations so users understand why signing fails early when a MuSig2 session is missing or evicted.

Security signals we found

01

UX-hardening: fail-fast before user approval instead of after

02

New specific error code EC_SIGN_PSBT_MUSIG2_SESSION_NOT_FOUND for missing MuSig2 sessions

03

Refactored session storage lookup to support non-destructive existence check

04

No cryptographic or access-control changes observed

05

Tests added/updated to assert early failure behavior and error code

Risk score

Why this scored 26/100

Our methodology →
Potential impact 4/30
Exploitability 2/25
Stealth signal 3/15
Affected reach 5/15
Confidence 8/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.