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

askrene: don't leak channel intel entries

Public commit record

What the developer wrote

Authored by Lagrang3

68/100 · Adequate
askrene: don't leak channel intel entries

On deletion of individual channel intel entries we need to free the
pointer inside the structure.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a memory leak in the askrene plugin of Core Lightning. When individual channel intelligence entries were deleted, the code removed the entry from its array but forgot to free two internal pointers (impression and constraint). Over time, this could cause the node process to consume more memory than necessary. The fix explicitly hands those pointers to a temporary context so they are cleaned up when the operation finishes.

Recommended action

Apply the patch. Consider running valgrind or ASan on askrene layer operations that trigger many channel_intel deletions to confirm the leak is closed and no use-after-free or double-free was introduced by the tal_steal ordering.

Security signals we found

01

Memory leak in plugin data structure cleanup

02

Missing deallocation of nested pointers before array removal

03

Fix located in routing/intelligence plugin (askrene)

Risk score

Why this scored 35/100

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