Skip to content

Move past the libz-sys heap-overflow advisory - #367

Merged
SDL-A1 merged 1 commit into
mainfrom
fix/rustsec-2026-0544
Nov 17, 2026
Merged

SDL-A1 merged 1 commit into
mainfrom
fix/rustsec-2026-0544

Conversation

@SDL-A1

@SDL-A1 SDL-A1 commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

RUSTSEC-2026-0544 / CVE-2026-85091, published 11 November: a heap buffer
overflow in zlib's gz_vacate(), reachable by calling gzprintf() or
gzvprintf() on a non-blocking gzFile after a write stall.

A patch bump within the same minor clears it — libz-sys 1.1.31 → 1.1.33.
One Cargo.lock line. No deny.toml exception is added and none is needed.

The node was never exploitable through this

The bump is hygiene, not a fix. Every link in the chain is broken:

  • libz-sys enters only through librocksdb-sys, which uses zlib's raw
    deflate/inflate stream API for block compression and never the
    gzip-file API the overflow lives in. The function is linked and never
    called.
  • Our own gzip use does not touch zlib. flate2 here resolves to the
    miniz_oxide / zlib-rs backends, which are pure Rust and do not link
    libz-sys.
  • Even if it did: flate2 exposes no gzprintf equivalent, its only
    callers read and write operator-supplied local files, and that I/O is
    blocking — where the advisory requires non-blocking mode plus a write
    stall.
  • No path from the network. Nothing a peer sends reaches zlib, by any
    route.

So no restart is required. This reaches production whenever the node is next
deployed for an unrelated reason.

Why land it now

Two reasons, neither of them urgency:

A red advisory check teaches everyone to ignore advisory checks, and this one
will stay red on every branch until the lockfile moves.

And it currently fails two external pull requests that did not cause it —
#365 and #366 both inherit the lockfile from main, so both are blocked by a
check that was never theirs.

How it surfaced, which is the part worth noting

main's last Security run passed on 15 November; the advisory landed on the
11th and was picked up by the database afterwards. Nothing noticed, because
no workflow has run automatically on this repository since the migration —
every run so far has been a manual dispatch.

The Security workflow says why it exists in its own header:

The daily schedule is the important part: advisories get published against
dependencies that are already pinned, so a push-only workflow would never
notice them.

That cron has not fired once here. It took an outside contributor's pull
request to surface a vulnerability in our own lockfile.

cargo deny check advisories: ok

🤖 Generated with Claude Code

RUSTSEC-2026-0544 / CVE-2026-85091, published 11 November: a heap buffer overflow in zlib gz_vacate(), reachable by calling gzprintf() or gzvprintf() on a non-blocking gzFile after a write stall. A patch bump within the same minor clears it, 1.1.31 to 1.1.33, so no deny.toml exception is needed and none is added.

The node was never exploitable through it, and the bump is hygiene rather than a fix. libz-sys enters only through librocksdb-sys, which uses zlib raw deflate/inflate stream API for block compression and never the gzip-file API the overflow lives in. Our own gzip use goes through flate2 on the miniz_oxide and zlib-rs backends, which are pure Rust and do not link libz-sys at all; flate2 exposes no gzprintf equivalent, the only callers read and write operator-supplied local files, and that I/O is blocking. Nothing a peer sends reaches zlib by any route.

Landing it anyway because a red advisory check teaches everyone to ignore advisory checks, and because it currently fails two external pull requests that did not cause it -- both inherit the lockfile from main.

cargo deny check advisories: ok.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SDL-A1
SDL-A1 merged commit df7899b into main Nov 17, 2026
7 checks passed
ColbySerpa added a commit to HORNET-Storage/Rustock that referenced this pull request Nov 18, 2026
Upstream's four pull requests since 169ef57: the external IP looked up
over HTTPS when --external-ip is not set (Rustock-dev#365), the node run from a
prebuilt binary in Docker and configured from .env (Rustock-dev#366), libz-sys
moved past its heap-overflow advisory (Rustock-dev#367), and CLAUDE.md on
screening an outside pull request without running it (Rustock-dev#373).

Three files conflicted:

- crates/cli/Cargo.toml: both sides added tokio-rustls (ring, tls12)
  and webpki-roots, upstream's for the external-IP lookup and this
  branch's for --import. They are listed once, under one comment for
  both, beside this branch's serde_json and sha2. Cargo.lock gains no
  package over upstream's.
- deny.toml: both sides rewrote the note on webpki-roots' licence. It
  now names every use: the external-IP lookup, Rootstock's server for
  --import, a stable minimum gas price's web source, and lettre under
  the smtp feature.
- crates/cli/src/main.rs: both sides' modules are kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants