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

lightningd: fix race with crossover pings.

Public commit record

What the developer wrote

Authored by Rusty Russell

68/100 · Adequate
lightningd: fix race with crossover pings.

We cannot use subd_req() here: replies will come out of order, and the
we should not simply assign the reponses in FIFO order.

Changelog-Fixed: lightningd: don't get confused with parallel ping commands.
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 fixes a bug in Core Lightning's handling of multiple ping commands sent at the same time. Previously, if two ping commands were issued in parallel, the replies could arrive out of order and be matched to the wrong command, potentially causing incorrect responses or confusion in the node. The fix adds a unique request ID to each ping so replies can be correctly paired with their original commands.

Recommended action

Treat as a bug fix with low-to-moderate security relevance. Review whether other subd_req() callers in the codebase similarly assume ordered replies and could benefit from request IDs. No immediate emergency response required, but operators should update to avoid incorrect ping behavior and any dependent logic.

Security signals we found

01

Race condition in inter-process request/response pairing

02

Out-of-order message handling could misattribute ping results

03

Replacement of implicit FIFO correlation with explicit request ID

04

Potential for command state confusion or incorrect JSON-RPC responses

Risk score

Why this scored 37/100

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