llamaCVEVulnerability Intelligence
/
Advisory · GitHub · crates.io · zebra-network

GHSA-H72H-PPCX-998P

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

Parche disponible
Descargar PNG JSON
CVSS
—
low
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -34 d de la divulgación
Exposición139 dDesde la divulgación, 2 jul 2026, 2:42 p. m.
Detección137 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 7.0.0 +1
Monitoreo
Detectada
29 may 26
2 jul 26
17 nov 26
19 nov 26
29 may 26
12 jul 26
24 ago 26
7 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 7.0.0 zebra-network · -34 d desde divulgación
Remediación Parche 4.5.0 zebrad · -34 d desde divulgación
Divulgación Publicada GHSA-H72H-PPCX-998P divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
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.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
zebrad< 4.5.0
zebra-network< 7.0.0
4.5.0
7.0.0
15.0.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
crates.iozebra-network
Corregida 7.0.0 -34 d 15.0.0 no afectada
crates.iozebrad
Corregida 4.5.0 -34 d 7.0.0 no afectada
Versiones corregidas4.5.07.0.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://github.com/ZcashFoundation/zebra/security/advisories/GHSA-h72h-ppcx-998p
Otrahttps://github.com/ZcashFoundation/zebra
Otrahttps://github.com/ZcashFoundation/zebra/blob/d4cd662c716382f6397d2a730148025a1ca79fec/zebra-network/src/peer/handshake.rs#L917-L934
Otrahttps://github.com/ZcashFoundation/zebra/blob/d4cd662c716382f6397d2a730148025a1ca79fec/zebra-network/src/protocol/external/codec.rs#L359-L416

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.