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

Merge PR 'Fix payment attribution edge cases and simplify claiming' (#5021)

Public commit record

What the developer wrote

Authored by Matt Corallo

81/100 · Strong
Merge PR 'Fix payment attribution edge cases and simplify claiming' (#5021)

from fulfillment-prerequisites into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5021
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit refactors how LDK nodes claim incoming Lightning payments. It replaces a separate 'claim with known custom TLVs' method with an options struct passed to the normal claim call, and fixes two edge cases in payment attribution data used for timing analysis: it caps failure-packet size to prevent oversized messages and ensures trampoline-style forwarded claims start fresh attribution rather than reusing downstream data. The changes are mostly defensive correctness fixes rather than an active vulnerability patch.

Recommended action

Review downstream callers that previously used claim_funds_with_known_custom_tlvs and migrate them to claim_funds with ClaimFundsOptions { custom_tlvs_known: true }. Monitor for any protocol or compatibility issues arising from the new failure-packet size cap and the changed trampoline attribution behavior.

Security signals we found

01

API change: claim_funds now takes ClaimFundsOptions, consolidating TLV-known behavior into one path

02

Failure-packet length bound added to prevent oversized onion error messages

03

Incoming failure packet truncated at 32 KiB before processing

04

Trampoline/delegated forward claims no longer propagate downstream attribution upstream

05

New regression test delegated_trampoline_claim_starts_new_attribution

06

Attribution HMAC computation optimized by cloning a precomputed message HMAC engine

Risk score

Why this scored 47/100

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