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

Merge bitcoin/bitcoin#35933: psbt: don't abort on invalid MuSig2 derivations

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#35933: psbt: don't abort on invalid MuSig2 derivations

73a94b45459a9433ffcf99aff3b044cc7166ee12 psbt: avoid aborting on invalid MuSig2 derivations (Lőrinc)
e3d1e75a519a3542a736c3097ce8ab3a2bd8dc5c test: characterize MuSig2 derivation aborts (Lőrinc)

Pull request description:

**Problem:** A PSBT may contain MuSig2 derivation metadata with a hardened child index or a path that derives to a different key.
The hardened index aborts during public derivation, while the mismatched key aborts at the result assertion.
`analyzepsbt`, `finalizepsbt`, and `descriptorprocesspsbt` all reach this code without a wallet.
Even the read-only `analyzepsbt` can force a co-signer service to restart its node after unexpected input.

**Fix:** Return failure when a MuSig2 derivation path contains a hardened child index, and skip only the current aggregate when the path derives to a different key so another matching aggregate can still be tried.

This follows [#35154](https://github.com/bitcoin/bitcoin/pull/35154), with the related contributions credited in the commits.

ACKs for top commit:
jeanpablojp:
ACK 73a94b45459a9433ffcf99aff3b044cc7166ee12
achow101:
ACK 73a94b45459a9433ffcf99aff3b044cc7166ee12
andrewtoth:
ACK 73a94b45459a9433ffcf99aff3b044cc7166ee12

Tree-SHA512: d8e28c5a4184154a4427c644ce62423cbcccdc3d82a6293f36fe99055fa04714598bc92c43b526fbcc7c99b231140669c2d0f1b853999d7dc33f949564c90504
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This update fixes a crash bug in Bitcoin Core's handling of certain partially-signed Bitcoin transactions (PSBTs). A malformed MuSig2 derivation path could previously trigger an internal abort (assertion failure or hard crash), even through a read-only RPC call like analyzepsbt. The fix turns those crashes into ordinary failures, so an attacker can no longer force a co-signer node to restart by submitting a bad PSBT.

Recommended action

Apply the merge commit. The fix is minimal and well-tested; nodes that process untrusted PSBTs (especially co-signer or watch-only services exposing analyzepsbt/finalizepsbt) should upgrade promptly to avoid remote-triggered crashes.

Security signals we found

01

Denial-of-service via crafted PSBT input

02

Assertion abort reachable through read-only RPC (analyzepsbt)

03

MuSig2 public-key derivation path not validated before use

04

Hardened derivation index triggers abort from public xpub

05

Mismatched derived key triggered assert rather than graceful failure

Risk score

Why this scored 78/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 12/15
Affected reach 12/15
Confidence 9/10
Evidence quality 5/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.