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

lnpeer: remove support for zlib compression

Public commit record

What the developer wrote

Authored by f321x

76/100 · Adequate
lnpeer: remove support for zlib compression

Must not be used anymore according to bolt 7:
https://github.com/lightning/bolts/blob/0cf21511a781c295b9374aeaef37cf9c4d193502/07-routing-gossip.md?plain=1#L600
✓ 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 removes the ability of Electrum's Lightning peer code to decompress routing data using zlib. The change follows an updated Lightning protocol rule (BOLT 7) that says uncompressed routing data must be used. Keeping zlib support could, in theory, allow a malicious peer to send a specially crafted compressed payload that causes crashes, excessive memory use, or other unexpected behavior. The patch is straightforward and defensive, but it is a partial removal: it only stops accepting compressed data and does not add broader input-size checks.

Recommended action

Apply the patch to remove zlib support. As a follow-up, consider adding an explicit length check in decode_short_ids() to ensure the encoded payload size is a multiple of 8 plus 1, and bound the number of IDs parsed to prevent memory exhaustion from a malicious peer.

Security signals we found

01

Removal of untrusted zlib decompression path

02

Protocol compliance update to BOLT 7

03

Potential denial-of-service surface from compressed input eliminated

04

No explicit length validation added for remaining uncompressed path

Risk score

Why this scored 33/100

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