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

plugin: fix feature_set allocation

Public commit record

What the developer wrote

Authored by Peter Neuroth

58/100 · Thin
plugin: fix feature_set allocation

Using `tal_dup_or_null` does not set the tal context to the included
bytes array. Luckily we already have a function tha deeply duplicates
a `feature_set`: `feature_set_dup`

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
✓ Descriptive subject✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a memory-management bug in Core Lightning's plugin handling. The old code used a shallow copy (`tal_dup_or_null`) to duplicate a plugin's feature set, which did not properly copy the underlying byte arrays. The fix switches to `feature_set_dup`, which performs a deep copy. The bug could lead to use-after-free or memory corruption if the original feature set's data was freed while the plugin still held a reference. There is no direct evidence in the commit or supplied references of an exploitable security vulnerability, remote trigger, or disclosed incident.

Recommended action

Treat as a routine bug fix with latent security implications. Review whether the shallow-copy bug was reachable in released versions and whether it could cause crashes or memory corruption. No immediate emergency response is indicated by the commit alone, but backporting the one-line fix to stable branches is reasonable.

Security signals we found

01

Memory-management bug: shallow copy of struct containing pointer arrays

02

Potential use-after-free on feature bit byte arrays

03

Fix uses existing deep-copy helper `feature_set_dup`

04

No vendor security framing, CVE, or advisory referenced in commit

Risk score

Why this scored 43/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/15
Affected reach 8/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.