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

lightningd: don't allow enableoffer on single-use offer.

Public commit record

What the developer wrote

Authored by 21M4TW

65/100 · Adequate
lightningd: don't allow enableoffer on single-use offer.

Changelog-Fixed: enableoffer: Adding an error when trying to activate an used single use offer (don't crash!)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in Core Lightning's offer management. A 'single-use offer' is meant to be used once and then become inactive. Previously, calling the enableoffer command on an already-used single-use offer could cause the node to crash. The fix adds a clear error message instead of crashing. It also removes an 'expected failure' marker from a related test, meaning that test now passes.

Recommended action

Treat as a low-severity hardening fix. Upgrade nodes that expose offer RPCs to users, and review whether any automated tooling or plugins call enableoffer on single-use offers, since they will now receive error code 1007 instead of a crash.

Security signals we found

01

Denial-of-service vector: unhandled state transition could crash the lightningd daemon

02

Input validation gap: enableoffer did not guard against re-activation of used single-use offers

03

New error code introduced to explicitly reject invalid state transition

04

Test expectation changed from expected-fail to passing

Risk score

Why this scored 44/100

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