github zcash/lightwalletd v0.6.2

one hour ago

Added

  • --client-stream-idle-timeout (seconds, default 30) cancels a
    client-streaming RPC whose client has sent nothing for that long, whether
    before the first message or between messages. Without it, a client that
    opens GetTaddressBalanceStream and sends no address parks a handler
    goroutine indefinitely, so enough open streams exhaust memory. Set it to 0
    to disable (GHSA-5xg7-x58j-m5vr, GHSA-4wjx-vhhv-vc8c).

  • --max-concurrent-recv bounds how many requests the server receives at
    once across every connection; the default is 32. gRPC reads a whole request
    into memory before any handler runs, so many large requests arriving at
    once could exhaust memory. A request over the limit is refused with
    UNAVAILABLE before its body is read, and one whose body hasn't arrived
    within 20 seconds is canceled. Client-streaming calls, including gRPC
    reflection, count against a separate pool of the same size for as long as
    they're open. Set it to 0 for no limit (GHSA-xrx5-jc6q-9h8r).

    When a pool is full, a new request can take the oldest slot of the
    connection holding the most, so one connection can't lock out the rest.
    Clients spread over many connections still can, so a per-IP connection
    limit at a proxy or firewall is a good idea.

  • --max-concurrent-sendtx-mib bounds the transaction data, in MiB, that
    SendTransaction works on at once; the default is 16. Each transaction is
    copied several times on its way to the backend. Requests over the limit are
    refused with UNAVAILABLE. Set it to 0 for no limit
    (GHSA-xrx5-jc6q-9h8r).

Changed

  • Repeated poolTypes entries in a GetBlockRange, GetBlockRangeNullifiers
    or GetMempoolTx request are now ignored after the first, so the server's
    filtering cost no longer grows with the length of the list
    (GHSA-8vh8-6jg3-8f5v).

  • The largest request lightwalletd accepts is now 2 MiB, down from gRPC's
    default of 4 MiB. That still fits the largest transaction
    SendTransaction accepts. This doesn't apply in darkside mode, and neither
    does --max-concurrent-recv.

  • A GetMempoolTx mempool refresh that fails no longer holds off other
    callers' refreshes for two seconds. A client that cancels, or stops
    reading, no longer stops the mempool view from being refreshed. A
    transaction that fails to parse is skipped rather than failing every
    refresh until it leaves the mempool (GHSA-w64p-hjp5-3mj7).

  • GetMempoolStream no longer holds its shared lock while calling the
    backend, so a slow backend no longer stalls every other stream client or
    keeps them from noticing a cancel. A client that cancels no longer stops
    the refresh it started, and a transaction that fails to parse is skipped
    rather than failing every refresh until the next block
    (GHSA-hp3q-vfr4-v8m6, GHSA-pj5c-jx29-gmxr).

Fixed

  • A request with a huge number of list elements is now refused before it is
    decoded. An empty element takes 2 bytes on the wire but 16 to 24 bytes once
    decoded, so a single 4 MiB request could cost almost 90 MiB before the
    per-request limits on addresses or excluded txids could reject it, and a
    few at once could exhaust the server's memory. The limits checked before
    decoding are twice the existing ones, so a request just over a limit still
    gets the same InvalidArgument as before (GHSA-p4pq-3cf7-45rv).

  • GetMempoolTx no longer sorts the shared mempool list in place. Concurrent
    callers each read that list without holding the lock, so the in-place sort let
    one caller reorder it under another, which could send a transaction twice and
    skip another. MempoolFilter now works on copies and leaves its arguments
    untouched.

  • The Prometheus metrics HTTP listener (--http-bind-addr) now has request
    timeouts: 10 seconds for a request's headers to arrive, 30 seconds for the
    whole request and for the response, and 60 seconds idle. Before, a peer
    that sent a partial request held its connection, and a file descriptor,
    for as long as it liked, and enough of them starved the gRPC listener in
    the same process (GHSA-w24w-x7vw-f2w8). A failure to start the listener is
    now logged instead of ignored.

    The listener also uses its own handler mux, so it no longer serves
    /debug/vars, which exposed the command line, including an RPC password
    given there (GHSA-j79f-98gc-33jw).

  • A block with no transactions, or whose first transaction has no
    transparent input, is now rejected by the parser instead of crashing the
    process when its height is read. Consensus requires a coinbase with one
    input, so only darkside mode or a misbehaving backend could supply such a
    block (GHSA-56hr-g827-v3rj, GHSA-jcrq-vv43-968c).

  • Darkside AddAddressUtxo now rejects a transaction ID that isn't 32 bytes
    with InvalidArgument instead of crashing (GHSA-pp3p-5vmm-3cvw).

  • A panic in a gRPC handler now fails that one request with Internal and
    logs a stack trace, instead of ending the process.

  • Transparent-address validation compiles its regular expression once
    instead of on every address, so a request with many addresses no longer
    costs thousands of compilations (GHSA-x943-ghgq-v675).

  • The startup debug log line that prints the parsed options no longer
    includes the backend RPC password (CodeQL alert #4).

Security

  • Built with Go 1.27.4, which fixes an HTTP/1 server crash in net/http
    (GO-2026-6859). Only lightwalletd's HTTP listener uses HTTP/1, and it binds
    to localhost by default. Also updated golang.org/x/net to v0.62.0, which
    fixes two issues in its html package (GO-2026-6860, GO-2026-6866).
    lightwalletd doesn't use that package.

  • Updated golang.org/x/net to v0.60.0, which fixes five HTTP/2 server
    vulnerabilities reachable through gRPC (GO-2026-6603, GO-2026-6610,
    GO-2026-6611, GO-2026-6612, GO-2026-6617). Two of them let a client crash
    the process or exhaust its memory (GHSA-gq9m-j9cv-6w9p).

Don't miss a new lightwalletd release

NewReleases is sending notifications on new releases.