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

xpay: fix taken leak if we fail xpay_core early.

Public commit record

What the developer wrote

Authored by Rusty Russell

70/100 · Adequate
xpay: fix taken leak if we fail xpay_core early.

This was uncovered by a test in the next commit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a small memory-management bug in the xpay plugin of Core Lightning. If the plugin's main payment function exits early (for example, because it receives an invalid invoice), it could fail to properly release a temporary copy of the invoice string, causing a minor memory leak. The fix makes an explicit copy of the string at the start so it can be safely cleaned up later. There is no direct evidence this is a security vulnerability, and the commit message does not describe it as one.

Recommended action

Treat as a routine bug fix. No urgent security action is indicated. If running a node with heavy xpay usage and early-exit invoice parsing, apply the patch to avoid gradual memory growth. Monitor for related denial-of-service research if disclosed.

Security signals we found

01

Memory/resource leak in plugin code path

02

Early-exit path bypasses take() ownership transfer

03

Fix is defensive but commit does not frame as security-relevant

Risk score

Why this scored 21/100

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