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

Merge pull request #11008 from LNBIG-COM/fix/psbt-funding-lock-order

Public commit record

What the developer wrote

Authored by Yong

73/100 · Adequate
Merge pull request #11008 from LNBIG-COM/fix/psbt-funding-lock-order

lnwallet: fix limboMtx/intentMtx lock order inversion in PsbtFundingVerify
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a classic multi-threading bug in LND's wallet code. Two functions were acquiring the same two locks in opposite orders, which could cause a deadlock. When triggered, the wallet's single request-handler goroutine would freeze, permanently stopping all channel opening on the node and preventing newly confirmed channels from being announced. Only a restart would recover. The fix reorders the lock acquisition so both functions now take the locks in the same order.

Recommended action

Apply the patch to affected branches (0.20.4 and 0.21.3). Nodes using PSBT or batch funding should upgrade promptly. No immediate mitigation other than restart exists for the deadlock condition.

Security signals we found

01

Deadlock in wallet request handler

02

Lock-order inversion between limboMtx and intentMtx

03

Denial of service against channel funding and channel graph announcement

04

Requires PSBT or batch funding to trigger

05

Permanent impairment until node restart

Risk score

Why this scored 66/100

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