Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Zebra network: Zebra has pre-handshake buffer capacity reservation based on attacker-claimed body length

0
Low
Published: 07/02/2026 (07/02/2026, 19:42:05 UTC)
Source: GCVE Database
Product: zebra-network

Description

### Am I affected You are affected if: 1. You run `zebrad` up to and including `v4.4.1`. 2. Your node accepts inbound P2P connections (`network.listen_addr` is set, which is the default). ### Summary The P2P codec's `Codec::decode()` method calls `src.reserve(body_len + HEADER_LEN)` after parsing a 24-byte protocol header, using the attacker-claimed `body_len` field. This reserves up to `MAX_PROTOCOL_MESSAGE_LEN` (~2 MiB) of virtual buffer capacity per connection before any body bytes arrive and before the handshake completes. However, `BytesMut::reserve()` sets virtual capacity without committing physical memory pages. The operating system does not allocate physical RAM until bytes are actually written into the buffer. Since the attacker never sends body bytes, the reserved capacity remains uncommitted. Reproduction of the reporter's PoC (256 threads, 30 seconds of sustained connections) showed negligible RSS impact on the Zebra process. Zebra's existing mitigations further constrain the practical attack surface: per-IP connection limits (`max_connections_per_ip = 1`), a per-connection accept rate of approximately one per second, and a 3-second handshake timeout that cleans up idle connections. ### Details At `zebra-network/src/protocol/external/codec.rs:406`, after parsing the 24-byte header and validating the network magic and body length against `MAX_PROTOCOL_MESSAGE_LEN`, the codec calls `src.reserve(body_len + HEADER_LEN)`. The codec is constructed on the bare TCP stream before `negotiate_version()` runs, so the reservation is reachable from any TCP peer that can send 24 bytes. No legitimate Zcash handshake message (`version`, `verack`) is anywhere close to 2 MiB. The codec makes no distinction between pre-handshake and post-handshake message types when sizing the reservation. ### Patches The fix defers large buffer reservations until after the handshake completes, or caps the per-message reservation for pre-handshake messages to what `version`/`verack` actually require. ### Workarounds No workaround is needed. The existing per-IP rate limiting, handshake timeout, and connection limits effectively mitigate the practical impact. ### Impact Minimal. The reservation affects virtual address space only, not physical memory. Zebra's existing connection-management mitigations (per-IP limits, accept rate, handshake timeout) further constrain the attack. The code path is worth cleaning up for defense-in-depth but does not produce a measurable denial-of-service effect. ### Credit Reported by `@ouicate` via a private GitHub Security Advisory submission.

CVSS v3.1

Score 3.7low

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected software

crates.ioghsa
zebra-network
Affected versions
<7.0.0
crates.ioghsa
zebrad
Affected versions
<4.5.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/02/2026, 23:11:38 UTC

Technical Analysis

The vulnerability exists in Zebra's P2P codec where the decode method reserves buffer capacity based on the body length field claimed by an attacker in the protocol header before the handshake completes. This reservation can be up to approximately 2 MiB of virtual memory per connection. However, since physical memory is not allocated until data is written, and the attacker can avoid sending body bytes, the impact on actual memory usage is negligible. Zebra's mitigations, including per-IP connection limits, accept rate limits, and handshake timeouts, further reduce the attack surface. The fix involves deferring large buffer reservations until after handshake completion or limiting reservation size for pre-handshake messages.

Potential Impact

The vulnerability only affects virtual address space reservation without allocating physical memory, resulting in minimal impact. Existing mitigations such as limiting connections per IP, handshake timeouts, and connection accept rates effectively prevent practical denial-of-service. There is no measurable increase in resource usage or service disruption demonstrated by the reporter's proof of concept.

Mitigation Recommendations

A fix is available that defers large buffer reservations until after handshake completion or caps the reservation size for pre-handshake messages. No workaround is necessary as existing per-IP connection limits, handshake timeouts, and accept rate limits effectively mitigate the practical impact. Users should apply the official fix when available to improve defense-in-depth.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-h72h-ppcx-998p
Osv Schema Version
1.4.0
Aliases
[]
Ecosystems
["crates.io"]
Database Specific Severity
LOW
Cvss Version
3.1

Threat ID: 6a46ecb727e9c7971943ca19

Added to database: 07/02/2026, 22:56:55 UTC

Last enriched: 07/02/2026, 23:11:38 UTC

Last updated: 07/31/2026, 13:49:32 UTC

Views: 44

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses