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

plugins: remove unused json_buffer / json_toks members from libplugin-pay.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
plugins: remove unused json_buffer / json_toks members from libplugin-pay.

They were never referenced, and saving the toks is questionable since their
lifetime is not guaranteed to live beyond this call (at least the buffer was
duplicated, but that also assumed it was at the start of the object).

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 commit removes two unused data fields from the payment-handling code in Core Lightning's plugins. The fields stored a copy of the incoming JSON command buffer and a pointer to its parsed tokens, but nothing in the code actually read them. The commit message notes that keeping the parsed token pointer was especially questionable because the tokens could become invalid after the call. This is a code cleanup with no direct security fix; it eliminates a latent risk of future misuse but does not change any active behavior.

Recommended action

No immediate action required. Treat as routine cleanup. If auditing, verify that no other plugin code still references `json_buffer` or `json_toks` on `struct payment`.

Security signals we found

01

Removal of unused pointer members whose lifetime was not guaranteed

02

Commit message explicitly calls out questionable lifetime assumptions for stored JSON tokens

03

No functional change; no active vulnerability is patched

Risk score

Why this scored 15/100

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