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

wallet: store payment failure details per groupid

Public commit record

What the developer wrote

Authored by daywalker90

68/100 · Adequate
wallet: store payment failure details per groupid

wallet_payment_set_failinfo() matched rows on payment_hash and partid
only, a leftover from before groupid became part of the payments key.
Every failed retry in a new group therefore overwrote the failure
details of all earlier failed groups with the same partid, so
waitsendpay (and erroronion in listsendpays/listpays) for an earlier
group reported the latest group's error.

Match on groupid too, like wallet_payment_set_status() and
wallet_payment_get_failinfo() already do.

Changelog-Fixed: JSON-RPC: `waitsendpay` for an earlier `groupid` now reports that attempt's failure, not the failure of a later retry.
✓ 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 database bug in Core Lightning where failure details for a payment attempt were being overwritten by later retry attempts that shared the same payment identifier fragment. The fix makes the failure record match on an additional 'groupid' field, so each retry group's error is stored separately. It is a correctness bug, not a security vulnerability: no funds are at risk and no attacker can exploit it.

Recommended action

No security action required. Treat as a normal bug-fix release. Operators may update to obtain correct waitsendpay/listsendpays error reporting for retried payments.

Security signals we found

01

Data integrity bug causing incorrect error reporting across payment retry groups

02

No memory safety, authentication, authorization, or cryptographic issues present

03

No external input is trusted or validated differently

04

Fix is localized to SQL UPDATE key matching

Risk score

Why this scored 30/100

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