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

lightningd: require local_alias in new_channel().

Public commit record

What the developer wrote

Authored by Rusty Russell

68/100 · Adequate
lightningd: require local_alias in new_channel().

We allowed NULL for stub channels, but just don't put the stub scid
into the hash tables. This cleans up all the callers to make it
clear this is a non-optional parameter.

We opencode channel_set_random_local_alias, since there's only one caller now.

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

What changed, and why it matters

This commit is a code-cleanup change in Core Lightning that makes the local channel alias a required value when creating a channel record, instead of allowing it to be optional/NULL. It removes a fallback that generated a random alias if one was missing. The change is defensive: it ensures every channel has a known local alias and avoids subtle bugs where a missing alias could lead to inconsistent channel lookup tables. There is no direct evidence in the commit or supplied references that this fixes an active security vulnerability.

Recommended action

Treat as a hardening/cleanup commit. Review that all callers of new_channel() and new_unsaved_channel() in downstream branches provide a valid local alias, and verify the stub SCID (1x1x1) is never inserted into the chanmap. No urgent security action is indicated by the supplied materials.

Security signals we found

01

Defensive invariant enforcement: local alias becomes mandatory rather than optional

02

Removal of NULL fallback path that silently generated random aliases

03

Hash table (chanmap) insertion logic now conditional on non-stub alias

04

Memory ownership semantics clarified (TAKES vs pass-by-value) reducing use-after-free/double-free risk

05

No explicit security bug, CVE, or vulnerability described in commit message

Risk score

Why this scored 25/100

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