Skip to content

chore(deps): bump vulnerable rust packages (rustls, hickory-resolver) - #11828

Merged
basvandijk merged 4 commits into
masterfrom
bas/bump-vulnerable-rust-packages
Oct 12, 2026
Merged

basvandijk merged 4 commits into
masterfrom
bas/bump-vulnerable-rust-packages

Conversation

@basvandijk

@basvandijk basvandijk commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Resolves the 8 open cargo Dependabot alerts, which are filed against Cargo.lock and Cargo.Bazel.toml.lock.

Crate Old → New Alerts closed
rustls 0.23.37 (Cargo) / 0.23.27 (Bazel) → 0.23.45 #630, #634 (GHSA-2mjx-qc3c-rqvc)
hickory-resolver, hickory-net, hickory-proto 0.26.1 → 0.26.3 #627-#629, #631-#633 (GHSA-5j98-2g5x-46v6, GHSA-6w6g-hm98-mhgm, GHSA-6f2x-v7q7-m7m5)

The new versions force these transitive bumps:

  • rustls ≥ 0.23.44 requires aws-lc-rs ^1.18. That moves aws-lc-rs 1.17.3 → 1.18.1, aws-lc-sys 0.43.0 → 0.45.0 (AWS-LC 5.7.0) and rustls-webpki 0.103.13 → 0.103.15.
  • Bazel lock only: hickory 0.26.3 requires resolv-conf ^0.7.6 and ipnet ^2.11. That moves resolv-conf 0.7.0 → 0.7.6 and ipnet 2.10.1 → 2.12.2, and drops hostname 0.3.1 and match_cfg.

Notes:

  • The version floors are raised in both Cargo.toml and bazel/rust.MODULE.bazel. This keeps the two builds aligned and stops them from regressing into the vulnerable ranges.
  • hickory 0.26.3 instead of the advisories' first patched version, 0.26.2. 0.26.2 declares hickory-net ^0.26.0 but does not compile against hickory-net 0.26.1 (Compilation errors hickory-dns/hickory-dns#3881). cargo update --precise 0.26.2 keeps hickory-net at 0.26.1.
  • PocketIC DNSSEC opt-out.
    • Since 0.26.2, hickory returns an error for answers that fail DNSSEC validation. That is the GHSA-5j98 fix; 0.26.1 returned such answers as Ok.
    • 0.26.2 and 0.26.3 also have an open regression, Truncated responses abort the TCP retry when nameservers are queried concurrently hickory-dns/hickory-dns#3963, introduced by the GHSA-6w6g fix. Validated lookups fail when two or more nameservers return truncated replies. That is routine for the DNSKEY sets of .io, .org, .systems and .network.
    • ic-bn-lib validates by default. As a result, a PocketIC HTTP gateway created with forward_to: Replica("https://icp-api.io") hung in POST /http_gateway, because setup_router(...).unwrap() panicked in the spawned task.
    • The gateway resolver now passes --dns-dnssec-disabled. That matches the previous effective behaviour, since bogus results were ignored. A TODO tracks dropping the flag once a hickory release includes resolver: retry over TCP when a late concurrent UDP response is truncated hickory-dns/hickory-dns#4062.
    • Nothing else in the repo validates DNSSEC:
      • the replica's nns_delegation_manager and reqwest's hickory resolver run without validation;
      • ic-boundary resolves through the registry;
      • the GuestOS ic-gateway sidecar is not launched, and its IC_URL is an IP literal.

How regenerated

cargo update -p rustls --precise 0.23.45
./bin/bazel-pin.sh rustls=0.23.45
cargo update -p hickory-resolver --precise 0.26.3
./bin/bazel-pin.sh hickory-resolver=0.26.3

./bin/bazel-pin.sh <crate>=<version> runs cargo update --package <crate> --precise <version>. The script's <crate>@<version> form is only a package-ID spec, not --precise.

Test plan

  • cargo update --workspace && ./bin/bazel-pin.sh is a no-op ("Locking 0 packages", "Nothing to repin."). This mirrors CI's lock-generate.

  • cargo check --all-targets --all-features -p pocket-ic-server, cargo fmt and ./ci/scripts/rust-lint.sh

  • bazel run //bazel:buildifier.check

  • bazel build //... --nobuild: clean except the known host-only @libvirt repo

  • bazel build //rs/pocket_ic_server:pocket-ic-server: the first build of aws-lc-sys 0.45.0 under the hermetic toolchain

  • bazel test //rs/http_endpoints/nns_delegation_manager:nns_delegation_manager_test //rs/crypto:integration_suite_tests/tls_handshake_test

  • PocketIC HTTP gateway with forward_to: Replica("https://icp-api.io"):

    • with this PR, GET /api/v2/status through the gateway returns HTTP 200;
    • with the hickory bump but without the opt-out, POST /http_gateway hangs and the server panics with "unable to fetch IC root key ... client error (Connect)".

    Both results reproduced 2/2.

  • CI passes with CI_ALL_BAZEL_TARGETS. This covers Bazel Test All over //... including long and system tests, arm64-linux, arm64-darwin and PocketIC Lint/Tests on Windows (aws-lc-sys 0.45 on MSVC). Build Determinism compared 62k execlog lines with no mismatches.

  • Dependabot closes the alerts listed above after merge. The Cargo.Bazel.toml.lock ones close once bazel-dependency-submission has run on master.

Follow-ups

  • Drop the PocketIC --dns-dnssec-disabled flag (the TODO in state.rs) once we upgrade to a hickory-dns release that includes resolver: retry over TCP when a late concurrent UDP response is truncated hickory-dns/hickory-dns#4062.
  • A panic in PocketIC's spawned HTTP gateway setup task leaves POST /http_gateway waiting on listening() forever. setup_router(...).await.unwrap() is one such panic, and it is how the DNSSEC failure surfaced. Propagating setup errors back to the caller would turn hangs like this into errors. This is pre-existing and left to the PocketIC owners.

🤖 Generated with Claude Code

basvandijk and others added 3 commits October 12, 2026 10:45
Fixes GHSA-2mjx-qc3c-rqvc (Dependabot alerts #630, #634). Raises the floor in
both Cargo.toml and bazel/rust.MODULE.bazel. The Bazel lock moves from 0.23.27,
the Cargo lock from 0.23.37. rustls >= 0.23.44 requires aws-lc-rs ^1.18, so this
also bumps aws-lc-rs 1.17.3 -> 1.18.1, aws-lc-sys 0.43.0 -> 0.45.0 and
rustls-webpki 0.103.13 -> 0.103.15.

  cargo update -p rustls --precise 0.23.45
  ./bin/bazel-pin.sh rustls=0.23.45

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fixes GHSA-5j98-2g5x-46v6, GHSA-6w6g-hm98-mhgm and GHSA-6f2x-v7q7-m7m5
(Dependabot alerts #627-#629, #631-#633).

Uses 0.26.3 rather than the advisories' first patched 0.26.2. 0.26.2 declares
hickory-net ^0.26.0 but does not compile against hickory-net 0.26.1
(hickory-dns#3881), and `--precise 0.26.2` keeps hickory-net at 0.26.1. 0.26.3
moves hickory-net and hickory-proto along with it. In the Bazel lock, hickory
0.26.3 also requires resolv-conf ^0.7.6 and ipnet ^2.11, which drops hostname
0.3.1 and match_cfg.

  cargo update -p hickory-resolver --precise 0.26.3
  ./bin/bazel-pin.sh hickory-resolver=0.26.3

Co-Authored-By: Claude Opus 5.5 <[email protected]>
hickory >= 0.26.2 turns DNSSEC-bogus answers into lookup errors (the fix for
GHSA-5j98-2g5x-46v6; 0.26.1 returned them as Ok). 0.26.2/0.26.3 also have an open
regression from the GHSA-6w6g-hm98-mhgm fix, hickory-dns#3963: validated lookups
fail when two or more concurrently queried nameservers send truncated replies.
That is routine for the DNSKEY sets of .io/.org/.systems/.network.

ic-bn-lib's default resolver validates and queries six public resolvers. A
PocketIC HTTP gateway forwarding to e.g. https://icp-api.io therefore failed in
its spawned setup task and never served. Pass --dns-dnssec-disabled and build the
resolver from the parsed CLI options. That matches the previous effective
behaviour, because bogus results were ignored. A TODO tracks dropping the flag once
a hickory release includes hickory-dns#4062.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@basvandijk basvandijk added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Oct 12, 2026
@github-actions github-actions Bot added the chore label Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The broad TLS/DNS dependency upgrade affects security-sensitive and cross-platform native code, with full CI still pending.

0 open findings

What changed in this PR

Updates vulnerable Rust TLS and DNS dependencies while preserving PocketIC gateway behavior.

Changes:

  • Upgrades rustls and hickory packages with required transitive dependencies.
  • Synchronizes Cargo and Bazel dependency floors and lockfiles.
  • Disables DNSSEC validation for PocketIC gateways pending the upstream fix.
File Description
Cargo.toml Raises dependency floors.
Cargo.lock Updates Cargo resolutions.
Cargo.Bazel.toml.lock Updates Bazel package resolutions.
Cargo.Bazel.json.lock Regenerates Bazel crate metadata.
bazel/​rust.MODULE.bazel Aligns Bazel dependency floors.
rs/​pocket_ic_server/​src/​state_api/​state.rs Applies the DNSSEC workaround.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Resolver initialization failure can panic the detached task and leave HTTP gateway creation waiting indefinitely.

1 open finding

🧠 Review effort: Balanced

@basvandijk
basvandijk marked this pull request as ready for review October 12, 2026 12:11
@basvandijk
basvandijk requested review from a team as code owners October 12, 2026 12:11
@basvandijk
basvandijk added this pull request to the merge queue Oct 12, 2026
Merged via the queue into master with commit 3dc8fc1 Oct 12, 2026
49 of 50 checks passed
@basvandijk
basvandijk deleted the bas/bump-vulnerable-rust-packages branch October 12, 2026 12:37
basvandijk pushed a commit to Ocheretovich/ic that referenced this pull request Oct 23, 2026
…nity#11896)

Disables DNSSEC validation in the `ic-gateway` that runs as a sidecar on
all-in-one (cloud engine) nodes, by setting `DNS_DNSSEC_DISABLED=true`
in the shipped `ic-os/components/guestos/share/ic-gateway.env`.

hickory >= 0.26.2 fails DNS lookups when answers are falsely marked as
DNSSEC-bogus (hickory-dns/hickory-dns#3963). We're on hickory-resolver
0.26.3. PocketIC already disables DNSSEC in its gateway for the same
reason (dfinity#11828).

The orchestrator overlays only the engine-specific settings (ACME,
domains, DNS provider) on top of this file, so the flag applies to every
all-in-one node.

This is temporary: revert it once we're on a hickory-dns release that
includes hickory-dns/hickory-dns#4062.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants