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

common: ignore proof-only fields when checking omitted markers

Public commit record

What the developer wrote

Authored by Vincenzo Palazzo

78/100 · Adequate
common: ignore proof-only fields when checking omitted markers

find_included_marker_predecessor treated every non-signature field as an
invoice TLV. next_marker() of the signature range is 1000000000, so a
proof whose only omitted marker was 1000000000 passed with no type-239
field. Skip 1001..999999999, same as next_field_check.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a validation bug in Core Lightning's handling of BOLT12 payer proofs. A payer proof is a cryptographic receipt that helps verify a payment. The bug allowed a malformed proof—one missing a required type-239 field—to be accepted as valid if it only contained a special 'omitted marker' value of 1,000,000,000. This happened because the code mistakenly treated certain proof-only fields as if they were regular invoice fields when checking whether a marker was legitimate. The fix makes the validator ignore those proof-only fields during that check, matching what another part of the code already did. A new test confirms the invalid proof is now rejected.

Recommended action

Review whether any other BOLT12 proof/invoice validation paths conflate proof-only fields with invoice fields. Ensure the fix is included in the next release and consider whether a security advisory is warranted if malformed proofs could lead to payment or routing issues.

Security signals we found

01

Validation bypass in BOLT12 payer proof omitted-marker check

02

Inconsistent handling of proof-only TLV range vs. existing next_field_check logic

03

Regression test added for rejected invalid proof

Risk score

Why this scored 60/100

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