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

libplugin: correctly mark that plugin_notification_end STEALS the stream.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
libplugin: correctly mark that plugin_notification_end STEALS the stream.

And also slightly generalize: plugin_notification_start() can take any
tal ptr.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This is a small cleanup in Core Lightning's plugin helper library. It changes how memory ownership is documented for plugin notification messages so the code's automatic memory tracking matches what actually happens. The change itself is defensive and unlikely to be directly exploitable, but it fixes a mismatch that could hide real memory-management bugs in plugins.

Recommended action

Treat as a low-risk correctness fix. Review any custom plugins that call plugin_notification_start/plugin_notification_end to ensure they do not manually free the json_stream after plugin_notification_end(), since the stream is now explicitly stolen. No urgent patching required unless static analysis or runtime memory issues are observed.

Security signals we found

01

Memory ownership annotation corrected from TAKES to STEALS

02

Function signature generalized to accept any tal context

03

Potential for use-after-free or double-free if callers relied on incorrect ownership semantics

04

No explicit security disclosure or CVE referenced in commit

Risk score

Why this scored 24/100

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