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

lsp_plugin: add reversed feature-bit check

Public commit record

What the developer wrote

Authored by Peter Neuroth

80/100 · Strong
lsp_plugin: add reversed feature-bit check

Core-Lightning returns the feature-bits in reversed order but we don't
want to rely on the caller to reverse the u8 slice themselfs. This
commit adds a convenience function that reverses the bitmap to avoid
hard to debug mistakes.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit is a small cleanup in a Core Lightning plugin. It moves the logic for reversing a list of feature bits into a shared helper function so callers don't have to remember to reverse the bytes themselves. The change is defensive: it reduces the chance of future mistakes when checking whether a peer supports a particular Lightning feature. There is no direct evidence in the commit of an active security bug being fixed, but the change is security-relevant because incorrect feature-bit checks could cause the plugin to misidentify peer capabilities.

Recommended action

No urgent action required. Reviewers should verify that is_feature_bit_set_reversed's documented semantics match Core Lightning's actual feature-bit encoding, and consider auditing other callers of is_feature_bit_set to ensure they use the correct helper.

Security signals we found

01

Feature-bit parsing is security-relevant in Lightning because misinterpreting feature bits can lead to incorrect capability negotiation

02

Manual byte reversal by callers is an error-prone pattern that could cause feature bits to be read from the wrong position

03

The commit adds a defensive helper with explicit documentation of byte-order semantics

Risk score

Why this scored 30/100

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