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

p2p: Error on decode for addresses > 512 bytes

Public commit record

What the developer wrote

Authored by Mitchell Bagot

68/100 · Adequate
p2p: Error on decode for addresses > 512 bytes

The AddrV2Decoder decodes the address type and the byte blob using
an ArrayDecoder + ByteVecDecoder. In the old version, a byte blob with
more than 512 bytes would throw an error, whilst the new version
successfully decodes it to an unknown address type.

Add check for address_bytes blob length > 512 bytes and throw error to
match old behaviour.
✓ 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 regression in the Bitcoin peer-to-peer address decoder. A recent rewrite accidentally stopped rejecting oversized network addresses (over 512 bytes), which could let malformed or unusually large data pass through as an unknown address type. The patch restores the original safety check that rejects such oversized inputs with an explicit error.

Recommended action

Review the decoder refactor for any other dropped validation checks, add regression tests for oversized AddrV2 address payloads, and consider fuzzing the P2P address decoding path.

Security signals we found

01

Input validation regression fixed

02

Restored length bound on deserialized address bytes

03

Potential DoS / resource consumption vector from oversized P2P address payloads

04

Behavioral compatibility fix to match previous implementation

Risk score

Why this scored 47/100

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