This release fixes several critical security issues. We recommend node operators update to
4.5.0 as soon as possible.
The release also adds support for mining to a shielded address.
Security
- Remove rejected block hashes from
SentHashesso honest re-deliveries are
not short-circuited as duplicates
(GHSA-4m69-67m6-prqp).
Thanks to @ipwning and @x15-eth for reporting the issue. - Cap the upfront
Vec::with_capacityreservation in
zcash_deserialize_external_countso a peer-suppliedCompactSize
cannot force a large allocation before any element bytes are read. The
Vecgrows naturally viapush()as real data arrives. Complements
the per-typemax_allocation()caps from PR #10494
(GHSA-xr93-pcq3-pxf8,
#10563). CWE-770. - Cap
block::Hash::max_allocationatMAX_BLOCK_LOCATOR_LENGTH = 101
(matching Bitcoin Core'sMAX_LOCATOR_SZinnet_processing.cpp) and
CountedHeader::max_allocationat the existing
MAX_HEADERS_PER_MESSAGE = 160constant (already enforced on the
sending side and at the codec level forread_headers). The previous
values were derived fromMAX_PROTOCOL_MESSAGE_LENand returned 65,535
and ~1,409 respectively, allowing a post-handshake peer to force ~2 MiB
of upfrontVecpreallocation pergetblocks/getheadersmessage
before any payload bytes were read. Same fix shape as
GHSA-xr93-pcq3-pxf8 forAddrV1/AddrV2(PR #10494)
(#10570). CWE-770. - Reject non-ASCII
longpollidvalues in thegetblocktemplateRPC
(GHSA-qv2r-v3mx-f4pf).
Thanks to @sangsoo-osec for reporting the issue. - Return error for malformed Sapling receiver in
z_listunifiedreceiversRPC
(GHSA-c8w6-x74f-vmg3).
Thanks to @robustfengbin for reporting the issue. - Prevent sync restart from poisoning the peer inventory registry, and score
peers that send consensus-invalid blocks
(GHSA-gvjc-3w7c-92jx,
GHSA-rj6c-83wx-jxf2,
GHSA-hwxr-r2v4-9f2p).
Thanks to @ipwning and @sangsoo-osec for reporting the issues. - Avoid panic in address-balance computation on same-address self-spend chains
by applying transparent debits before credits per transaction
(GHSA-w834-cf6p-9m9w).
Thanks to @sangsoo-osec for reporting the issue. - Reject repeated shielded transactions cleanly before the defence-in-depth
tx_loc_by_hashassertion, avoiding a panic
(GHSA-hhm7-qrv5-h4r6).
Thanks to @Haxatron for reporting the issue. - Cap pre-handshake message body length in
Codecto 1 KB; the cap is raised
toMAX_PROTOCOL_MESSAGE_LENafter handshake completion
(GHSA-h72h-ppcx-998p).
Thanks to @ouicate for reporting the issue. - Fix sigop undercount in P2SH inputs by routing through the
legacy_sigop_count_scriptFFI to matchzcashd's
CScript::GetSigOpCount(true)exactly, preventing a consensus split on
attacker-chosen redeem scripts
(GHSA-gf9r-m956-97qx).
Thanks to @samsulselfut for reporting the issue. - Cap the inbound mempool download queue per advertising peer so a single
peer cannot monopolize verification capacity
(GHSA-4fc2-h7jh-287c).
Thanks to @dingledropper for reporting the issue. - Canonicalize IPv4-mapped addresses on the misbehavior path so a peer cannot
evade scoring by alternating between IPv4 and IPv4-mapped-IPv6 forms of the
same address
(GHSA-63wg-wjjj-7cp8).
Thanks to @Haxatron for reporting the issue. - Drain the mempool downloader's
cancel_handlesentry when the outer
verification timeout fires, so the queuedGossip::Tx(UnminedTx)is not
retained until the process runs out of memory. Without the fix, a single peer
that gets each pushed transaction to hitRATE_LIMIT_DELAYcould leak up to
~2 MB per transaction monotonically
(GHSA-65jj-fmw8-468q).
Thanks to @AnticsDecoded for reporting the issue. - Pop Sapling/Orchard subtrees when popping non-finalized tip
(GHSA-2gf8-q9rr-jq3h).
Thanks to @dingledropper for reporting the issue.
Added
- Startup warning on Linux when
net.ipv4.tcp_slow_start_after_idleis enabled (which resets TCP congestion windows between block requests and significantly reduces single-peer block-propagation throughput on long-haul links), with a "Linux TCP tuning for block propagation" troubleshooting section (#10513) - Support for ZIP-213 (Shielded Coinbase) (#10048)
Changed
- Renamed
testnet_parametersin the network config; use[network.params]
instead (#10051). The
old format is still accepted.
Fixed
- Avoid panicking in the address-book ban path when
network.max_connections_per_ip > 1. Guard the optionalmost_recent_by_ipcache instead of unwrapping it, so a ban-threshold misbehavior update no longer crashes the address-book updater and poisons the shared mutex (#10589) - Propagate transaction-level value-balance errors from
Block::chain_value_pool_change()instead of silently dropping them. The previousflat_map(Result)aggregation relied onResult<T, E>: IntoIteratorand yielded zero items onErr, so a failing transaction was omitted from the block sum rather than surfacing as aValueBalanceError(#10590) - Solve Rust 1.97 beta clippy lints (#10644)
Contributors
Thank you to everyone who contributed to this release, we couldn't make Zebra without you:
@ValarDragon, @andres-pcg, @conradoplg, @dingledropper, @evan-forbes, @gustavovalverde, @oxarbitrage, @syszery, @upbqdn, @zmanian.