Skip to content

chore(deps): bump rand from 0.8.5 to 0.10.2 - #409

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/rand-0.10.2
Closed

chore(deps): bump rand from 0.8.5 to 0.10.2#409
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/rand-0.10.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 27, 2026

Copy link
Copy Markdown
Contributor

Bumps rand from 0.8.5 to 0.10.2.

Changelog

Sourced from rand's changelog.

[0.10.2] — 2026-07-02

Fixes

  • Fix possible memory safety violation due to deserialization of UniformChar from bad source (#1790)

Changes

  • Document required output order of fn partial_shuffle and apply #[must_use] (#1769)
  • Avoid usage of unsafe in contexts where non-local memory corruption could invalidate contract (#1791)

#1769: rust-random/rand#1769 #1790: rust-random/rand#1790 #1791: rust-random/rand#1791

[0.10.1] — 2026-02-11

This release includes a fix for a soundness bug; see #1763.

Changes

  • Document panic behavior of make_rng and add #[track_caller] (#1761)
  • Deprecate feature log (#1763)

#1761: rust-random/rand#1761 #1763: rust-random/rand#1763

[0.10.0] - 2026-02-08

Changes

  • The dependency on rand_chacha has been replaced with a dependency on chacha20. This changes the implementation behind StdRng, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones in chacha20 instead of rand_chacha (#1642).
  • Rename fns IndexedRandom::choose_multiple -> sample, choose_multiple_array -> sample_array, choose_multiple_weighted -> sample_weighted, struct SliceChooseIter -> IndexedSamples and fns IteratorRandom::choose_multiple -> sample, choose_multiple_fill -> sample_fill (#1632)
  • Use Edition 2024 and MSRV 1.85 (#1653)
  • Let Fill be implemented for element types, not sliceable types (#1652)
  • Fix OsError::raw_os_error on UEFI targets by returning Option<usize> (#1665)
  • Replace fn TryRngCore::read_adapter(..) -> RngReadAdapter with simpler struct RngReader (#1669)
  • Remove fns SeedableRng::from_os_rng, try_from_os_rng (#1674)
  • Remove Clone support for StdRng, ReseedingRng (#1677)
  • Use postcard instead of bincode to test the serde feature (#1693)
  • Avoid excessive allocation in IteratorRandom::sample when amount is much larger than iterator size (#1695)
  • Rename os_rng -> sys_rng, OsRng -> SysRng, OsError -> SysError (#1697)
  • Rename Rng -> RngExt as upstream rand_core has renamed RngCore -> Rng (#1717)

Additions

  • Add fns IndexedRandom::choose_iter, choose_weighted_iter (#1632)
  • Pub export Xoshiro128PlusPlus, Xoshiro256PlusPlus prngs (#1649)
  • Pub export ChaCha8Rng, ChaCha12Rng, ChaCha20Rng behind chacha feature (#1659)
  • Fn rand::make_rng() -> R where R: SeedableRng (#1734)

Removals

  • Removed ReseedingRng (#1722)
  • Removed unused feature "nightly" (#1732)
  • Removed feature small_rng (#1732)

... (truncated)

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jul 27, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner July 27, 2026 17:59
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Jul 27, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner July 27, 2026 17:59
@dependabot dependabot Bot added the rust Pull requests that update rust code label Jul 27, 2026
@dependabot
dependabot Bot force-pushed the dependabot/cargo/rand-0.10.2 branch from a5e76f0 to 39fdc8c Compare July 29, 2026 15:39
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.10.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.10.2)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@marc0olo

Copy link
Copy Markdown
Member

Closing in favour of a combined security PR, because this proposes the wrong target version.

rand is a genuine runtime dependency here — the published ic-vetkeys crate uses it, along with ic-vetkeys-test-utils, ic-vetkeys-manager-canister and ic-vetkeys-canisters-tests, via rand = "0.8.5" in the workspace Cargo.toml.

But the advisory this addresses (GHSA-cq8v-f236-94qc, low) is:

vulnerable range:  >= 0.7.0, < 0.8.6
first patched:     0.8.6

0.8.6 is a patch release. This PR jumps to 0.10.2 — two breaking majors past the fix — which would force a rand 0.8 → 0.10 API migration across four crates including the published crypto crate, and require moving rand_chacha 0.3.1 in lockstep. That is a large, risky change to take on for a low-severity advisory that a one-line patch bump resolves.

(For the record: the rand 0.10.2 already present in Cargo.lock is unrelated — it arrives via quinn-proto, transitively under the dev-only reqwest.)

Superseded by #436, which bumps rand to 0.8.6 and clears the openssl / rustls-webpki advisories in the same change.

@marc0olo marc0olo closed this Aug 26, 2026
@dependabot @github

dependabot Bot commented on behalf of github Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/cargo/rand-0.10.2 branch August 26, 2026 19:44
marc0olo added a commit that referenced this pull request Aug 27, 2026
Clears **all 12 open Dependabot advisories** in one change. Supersedes
#397, #380 and #409.

## Changes

| Package | Was | Now | Alerts cleared |
|---|---|---|---|
| `openssl` | 0.10.73 | **0.10.81** | 8 — 5 high, 2 medium, 1 low |
| `openssl-sys` | 0.9.109 | 0.9.117 | (transitive) |
| `rustls-webpki` | 0.103.10 | **0.103.15** | 3 — 1 high, 2 low |
| `rand` | 0.8.5 | **0.8.8** | 1 — low |

Each alert was checked against its own patched version; all 12 verify as
cleared. `openssl` and `rustls-webpki` land *newer* than the superseded
PRs proposed (0.10.80 / 0.103.13).

Three files, and the lockfile moves exactly four package versions — no
transitive churn.

## Why not `rand` 0.10.2, as #409 proposed

`rand` is the only one of the three that reaches shipped code — it is a
**runtime** dependency of the published `ic-vetkeys` crate (plus
`ic-vetkeys-test-utils`, `ic-vetkeys-manager-canister`,
`ic-vetkeys-canisters-tests`).

But the advisory
([GHSA-cq8v-f236-94qc](GHSA-cq8v-f236-94qc),
**low**) is:

```
vulnerable range:  >= 0.7.0, < 0.8.6
first patched:     0.8.6
```

0.8.6 is a **patch** release. #409 proposed `0.10.2` — two breaking
majors past the fix — which would force a `rand` 0.8 → 0.10 API
migration across four crates including the published crypto crate, plus
a lockstep `rand_chacha` 0.3 → 0.10 move. That is a large, risky change
to absorb for a low-severity advisory that a patch bump resolves. This
PR moves the manifest floor to `0.8.6` and the lock resolves `0.8.8`.

(The `rand 0.10.2` already in `Cargo.lock` is unrelated — it arrives via
`quinn-proto`, transitively under the dev-only `reqwest`, and is
untouched here.)

## Severity in context

`openssl` and `rustls-webpki` account for 11 of the 12 alerts, including
all 6 highs — but their real exposure is **CI-only**. Both reach the
tree solely via `reqwest`, which sits under `[dev-dependencies]` next to
`pocket-ic`, and the canisters compile to `wasm32-unknown-unknown` where
neither can exist. Neither appears in the published crate's dependency
list:

```
rand           req=^0.8.5    kind=normal
rand_chacha    req=^0.3.1    kind=normal
pocket-ic      req=^15.0.0   kind=dev
```

GitHub reports `scope=runtime` for all of them, but that is inferred
from `Cargo.lock`, which carries no dev/runtime split for transitive
packages. The manifests are the authority here.

## No release required

Published `ic-vetkeys@0.9.0` declares `rand = "^0.8.5"` — i.e. `>=0.8.5,
<0.9.0`. **`0.8.8` already satisfies that**, so anyone building against
0.9.0 today resolves the fixed version automatically; nobody is pinned
to the vulnerable 0.8.5 except via a stale local lockfile, which `cargo
update -p rand` fixes without any action from us.

`Cargo.lock` is not consumed by dependents of a library crate, and
dev-dependencies never propagate — so the `openssl` / `rustls-webpki`
half has zero consumer impact by construction.

The manifest floor bump to `0.8.6` only takes effect when we next
publish, and is belt-and-braces for the stale-lockfile case. **It can
ride the next release rather than triggering one.** Nothing here affects
`@icp-sdk/vetkeys` (npm) or the Motoko package.

## Verification

Ran the backend CI commands verbatim:

- `cargo build --release --target wasm32-unknown-unknown` for all four
canister crates — **pass**
- `cargo test` — **14 passed, 0 failed**, including the pocket-ic
integration tests (`key_sharing_should_work`,
`should_preserve_state_across_upgrade`,
`should_get_accessible_shared_key_ids`, …) that exercise the crypto
paths using `rand`
- `cargo test --doc` — pass (the 4 `ignored` doc-tests carry
pre-existing `ignore` annotations, unchanged here)
- `cargo clippy -- -Dwarnings` — pass
- `cargo fmt --check` — pass

`rand` 0.8.5 → 0.8.8 is a patch bump inside 0.8, so no API change was
expected; the green build and integration tests confirm it rather than
assume it.

## Superseded

- #397 — `openssl` → 0.10.80. Included here at 0.10.81.
- #380 — `rustls-webpki` → 0.103.13. Included here at 0.103.15.
- #409 — `rand` → 0.10.2. Replaced with the 0.8.x patch fix, per above.

Also closed as obsolete while triaging: #337, #316, #315 (targeted
`examples/`, removed in #377) and #406 (`vite` 7.3.5, already superseded
by `^7.3.6` from #434).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant