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

common/htlc_wire: add towire/fromwire helpers for wrapped tlv streams.

Public commit record

What the developer wrote

Authored by Rusty Russell

65/100 · Adequate
common/htlc_wire: add towire/fromwire helpers for wrapped tlv streams.

And make sure we check the length properly in fromwire!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit refactors how Core Lightning reads and writes optional extra TLV data attached to HTLC messages. The main functional change is adding a length check when reading these wrapped TLV streams, so a malformed message cannot claim a length larger than the remaining data. The commit message explicitly calls out that the length was not being checked properly before.

Recommended action

Treat as a low-to-moderate hardening fix. Review whether the missing length check was reachable from untrusted peer input and whether fromwire_tlv() behavior on short buffers could have caused out-of-bounds reads or parsing failures. No immediate emergency response is indicated, but backporting the defensive check is reasonable.

Security signals we found

01

Commit message states 'make sure we check the length properly in fromwire'

02

New fromwire helper adds explicit len > *max check before consuming bytes

03

Refactors duplicated TLV serialization logic into shared helpers

04

No CVE, advisory, or researcher attribution present in commit or references

Risk score

Why this scored 48/100

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