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

Test that the session is actually deleted once round 2 starts

Public commit record

What the developer wrote

Authored by Salvatore Ingala

83/100 · Strong
Test that the session is actually deleted once round 2 starts

The session must be deleted once round 2 starts, whether signing was
successful or not.

This makes sure that musigsession_pop() actually deletes the session.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit adds a security test and a small code change for Ledger's Bitcoin app to make sure a secret signing session is wiped from memory once the second round of a MuSig2 multi-signature operation starts. The concern is that if the session were not deleted, an attacker could trick the device into reusing secret randomness (a 'nonce') for a different transaction, which can leak the private key. The patch zeroes out the signing state at the end of round 1 and adds tests proving the session is consumed whether round 2 succeeds or fails.

Recommended action

Review whether explicit_bzero is placed in the correct function and whether any other round-1 exit paths (error/abort) also clear the signing state, because the header comment still says musigsession_commit must not be called on error. Ensure the production firmware passes the new tests and consider whether additional nonce-reuse defenses (e.g., deterministic nonce derivation or persistent anti-replay counters) are warranted.

Security signals we found

01

explicit_bzero clears signing state after round 1 to prevent secret leakage

02

New test asserts session is single-use and cannot be replayed for a different transaction

03

New test asserts a failed round 2 also consumes/deletes the session

04

Comment explicitly states 'leave no secret behind' and 'signing flow is over'

05

Relates to MuSig2 nonce-reuse private-key-exposure risk

Risk score

Why this scored 63/100

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