Skip to content

Update Rust crate rand to 0.10.0 [SECURITY]#10267

Open
oxide-renovate[bot] wants to merge 1 commit intomainfrom
renovate/crate-rand-vulnerability
Open

Update Rust crate rand to 0.10.0 [SECURITY]#10267
oxide-renovate[bot] wants to merge 1 commit intomainfrom
renovate/crate-rand-vulnerability

Conversation

@oxide-renovate
Copy link
Copy Markdown
Contributor

@oxide-renovate oxide-renovate Bot commented Apr 14, 2026

This PR contains the following updates:

Package Type Update Change
rand (source) workspace.dependencies minor 0.9.20.10.0

Rand is unsound with a custom logger using rand::rng()

GHSA-cq8v-f236-94qc

More information

Details

It has been reported (by @​lopopolo) that the rand library is unsound (i.e. that safe code using the public API can cause Undefined Behaviour) when all the following conditions are met:

  • The log and thread_rng features are enabled
  • A custom logger is defined
  • The custom logger accesses rand::rng() (previously rand::thread_rng()) and calls any TryRng (previously RngCore) methods on ThreadRng
  • The ThreadRng (attempts to) reseed while called from the custom logger (this happens every 64 kB of generated data)
  • Trace-level logging is enabled or warn-level logging is enabled and the random source (the getrandom crate) is unable to provide a new seed

TryRng (previously RngCore) methods for ThreadRng use unsafe code to cast *mut BlockRng<ReseedingCore> to &mut BlockRng<ReseedingCore>. When all the above conditions are met this results in an aliased mutable reference, violating the Stacked Borrows rules. Miri is able to detect this violation in sample code. Since construction of aliased mutable references is Undefined Behaviour, the behaviour of optimized builds is hard to predict.

Severity

Low

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

rust-random/rand (rand)

v0.10.1

Compare Source

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)

v0.10.0

Compare Source

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

v0.9.4

Compare Source

Fixes

Full Changelog: rust-random/rand@0.9.3...0.9.4

v0.9.3

Compare Source

This release back-ports a fix from v0.10. See also [#​1763].

Changes

Full Changelog: rust-random/rand@0.9.2...0.9.3


Configuration

📅 Schedule: (in timezone America/Los_Angeles)

  • Branch creation
    • ""
  • Automerge
    • "after 8pm,before 6am"

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

@oxide-renovate oxide-renovate Bot added the dependencies Pull requests that update a dependency file label Apr 14, 2026
@oxide-renovate
Copy link
Copy Markdown
Contributor Author

oxide-renovate Bot commented Apr 14, 2026

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path Cargo.toml --workspace
    Updating git repository `https://github.com/oxidecomputer/pq-sys`
From https://github.com/oxidecomputer/pq-sys
 * [new ref]         b1194c190f4d4a103c2280908cd1e97628c5c1cb -> refs/commit/b1194c190f4d4a103c2280908cd1e97628c5c1cb
    Updating crates.io index
    Updating git repository `https://github.com/oxidecomputer/slog-error-chain`
From https://github.com/oxidecomputer/slog-error-chain
 * [new ref]         15f69041f45774602108e47fb25e705dc23acfb2 -> refs/commit/15f69041f45774602108e47fb25e705dc23acfb2
    Updating git repository `https://github.com/oxidecomputer/lldp`
From https://github.com/oxidecomputer/lldp
 * [new ref]         d22509dfdb051321b859e924948605115691b93c -> refs/commit/d22509dfdb051321b859e924948605115691b93c
    Updating git repository `https://github.com/oxidecomputer/tufaceous`
From https://github.com/oxidecomputer/tufaceous
 * [new ref]         1eacfcf0cade44f77d433f31744dbee4abb96465 -> refs/commit/1eacfcf0cade44f77d433f31744dbee4abb96465
    Updating git repository `https://github.com/oxidecomputer/propolis`
From https://github.com/oxidecomputer/propolis
 * [new ref]         bc489ddf0f38f75e0c194b86cf6f0de377f68845 -> refs/commit/bc489ddf0f38f75e0c194b86cf6f0de377f68845
    Updating git repository `https://github.com/oxidecomputer/management-gateway-service`
From https://github.com/oxidecomputer/management-gateway-service
 * [new ref]         0d7a8992f914ad6a5947409048779969bbe80e3d -> refs/commit/0d7a8992f914ad6a5947409048779969bbe80e3d
    Updating git repository `https://github.com/oxidecomputer/crucible`
From https://github.com/oxidecomputer/crucible
 * [new ref]         7103cd3a3d7b0112d2949dd135db06fef0c156bb -> refs/commit/7103cd3a3d7b0112d2949dd135db06fef0c156bb
    Updating git repository `https://github.com/oxidecomputer/opte`
From https://github.com/oxidecomputer/opte
 * [new ref]         bae0440c199b3908c12903a9532854936353433b -> refs/commit/bae0440c199b3908c12903a9532854936353433b
    Updating git repository `https://github.com/oxidecomputer/tofino`
From https://github.com/oxidecomputer/tofino
 * [new ref]         7e56ab6e9a64ebae27cd97cd6e10ebf2cfdc3a33 -> refs/commit/7e56ab6e9a64ebae27cd97cd6e10ebf2cfdc3a33
    Updating git repository `https://github.com/oxidecomputer/maghemite`
From https://github.com/oxidecomputer/maghemite
 * [new ref]         7696ee48d5ee29a917dea459e281fe2e8ff20513 -> refs/commit/7696ee48d5ee29a917dea459e281fe2e8ff20513
    Updating git repository `https://github.com/oxidecomputer/clickward`
From https://github.com/oxidecomputer/clickward
 * [new ref]         e3d9a1c35cf3cd04f9cb2e997b0ad88324d30737 -> refs/commit/e3d9a1c35cf3cd04f9cb2e997b0ad88324d30737
    Updating git repository `https://github.com/oxidecomputer/dice-util`
From https://github.com/oxidecomputer/dice-util
 * [new ref]         10952e8d9599b735b85d480af3560a11700e5b64 -> refs/commit/10952e8d9599b735b85d480af3560a11700e5b64
    Updating git repository `https://github.com/oxidecomputer/openapi-lint`
From https://github.com/oxidecomputer/openapi-lint
 * [new ref]         1b65d761eae2bdd69e9801538ec9ca8a1d55ea71 -> refs/commit/1b65d761eae2bdd69e9801538ec9ca8a1d55ea71
    Updating git repository `https://github.com/oxidecomputer/dendrite`
From https://github.com/oxidecomputer/dendrite
 * [new ref]         44a949c9bedf4fcd4d280337fa1965b4293c88d1 -> refs/commit/44a949c9bedf4fcd4d280337fa1965b4293c88d1
    Updating git repository `https://github.com/oxidecomputer/transceiver-control`
From https://github.com/oxidecomputer/transceiver-control
 * [new ref]         11afc484d5957b13d3058e44db274aa720cea1c4 -> refs/commit/11afc484d5957b13d3058e44db274aa720cea1c4
    Updating git repository `https://github.com/oxidecomputer/ipcc-rs`
From https://github.com/oxidecomputer/ipcc-rs
 * [new ref]         524eb8f125003dff50b9703900c6b323f00f9e1b -> refs/commit/524eb8f125003dff50b9703900c6b323f00f9e1b
    Updating git repository `https://github.com/oxidecomputer/hubtools.git`
From https://github.com/oxidecomputer/hubtools
 * [new ref]         2b1ef9b38d75563ea800baa3b17327eec17b1b7a -> refs/commit/2b1ef9b38d75563ea800baa3b17327eec17b1b7a
    Updating git repository `https://github.com/oxidecomputer/scim2-rs`
From https://github.com/oxidecomputer/scim2-rs
 * [new ref]         018ae6f7bd752cd9b2124887e00c93c6b4244103 -> refs/commit/018ae6f7bd752cd9b2124887e00c93c6b4244103
    Updating git repository `https://github.com/oxidecomputer/illumos-devinfo`
From https://github.com/oxidecomputer/illumos-devinfo
 * [new ref]         4323b17bfdd0c94d2875ac64b47f0e60fac1d640 -> refs/commit/4323b17bfdd0c94d2875ac64b47f0e60fac1d640
    Updating git repository `https://github.com/oxidecomputer/libefi-illumos`
From https://github.com/oxidecomputer/libefi-illumos
 * [new ref]         54c398c139f0e65252c2c0f9565d2eec7116bf02 -> refs/commit/54c398c139f0e65252c2c0f9565d2eec7116bf02
    Updating git repository `https://github.com/oxidecomputer/libnvme`
From https://github.com/oxidecomputer/libnvme
 * [new ref]         dd5bb221d327a1bc9287961718c3c10d6bd37da0 -> refs/commit/dd5bb221d327a1bc9287961718c3c10d6bd37da0
    Updating git repository `https://github.com/oxidecomputer/dice-util`
From https://github.com/oxidecomputer/dice-util
 * [new ref]         ff9f27aa0d6ef6fb64c349890b6e3c242ea3d8fc -> refs/commit/ff9f27aa0d6ef6fb64c349890b6e3c242ea3d8fc
    Updating git repository `https://github.com/oxidecomputer/sprockets.git`
From https://github.com/oxidecomputer/sprockets
 * [new ref]         d2b68e4f47e3c22bce0455aeb4cfb2e61ad229ba -> refs/commit/d2b68e4f47e3c22bce0455aeb4cfb2e61ad229ba
    Updating git repository `https://github.com/oxidecomputer/rust-cpuid.git`
From https://github.com/oxidecomputer/rust-cpuid
 * [new ref]         a4cf01df76f35430ff5d39dc2fe470bcb953503b -> refs/commit/a4cf01df76f35430ff5d39dc2fe470bcb953503b
    Updating git repository `https://github.com/oxidecomputer/rats-corim.git`
From https://github.com/oxidecomputer/rats-corim
 * [new ref]         f0d5d5168d3d31487a56df32c676b0c6240bcc6b -> refs/commit/f0d5d5168d3d31487a56df32c676b0c6240bcc6b
    Updating git repository `https://github.com/bluecatengineering/dhcproto.git`
From https://github.com/bluecatengineering/dhcproto
 * [new ref]         120da6fcd8a7be84d417d372634ead84ce07e6da -> refs/commit/120da6fcd8a7be84d417d372634ead84ce07e6da
    Updating git repository `https://github.com/oxidecomputer/ispf`
From https://github.com/oxidecomputer/ispf
 * [new ref]         f78443a98397f7818b1e7a487dbb7d5cad625496 -> refs/commit/f78443a98397f7818b1e7a487dbb7d5cad625496
    Updating git repository `https://github.com/oxidecomputer/serde_human_bytes`
From https://github.com/oxidecomputer/serde_human_bytes
 * [new ref]         8f60acdfe7c6d9e2a01f59be920c1c2b19129322 -> refs/commit/8f60acdfe7c6d9e2a01f59be920c1c2b19129322
    Updating git repository `https://github.com/oxidecomputer/crucible`
From https://github.com/oxidecomputer/crucible
 * [new ref]         ae1da83e66c648574827298f4bc444632bf4d047 -> refs/commit/ae1da83e66c648574827298f4bc444632bf4d047
error: failed to select a version for `rand`.
    ... required by package `trust-quorum-types-versions v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/trust-quorum/types/versions)`
    ... which satisfies path dependency `trust-quorum-types-versions` (locked to 0.1.0) of package `sled-agent-types-versions v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/sled-agent/types/versions)`
    ... which satisfies path dependency `sled-agent-types-versions` (locked to 0.1.0) of package `nexus-types v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/nexus/types)`
    ... which satisfies path dependency `nexus-types` (locked to 0.1.0) of package `nexus-config v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/nexus-config)`
    ... which satisfies path dependency `nexus-config` (locked to 0.1.0) of package `omicron-test-utils v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/test-utils)`
    ... which satisfies path dependency `omicron-test-utils` (locked to 0.1.0) of package `omicron-certificates v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/certificates)`
versions that meet the requirements `^0.10.0` (locked to 0.10.0) are: 0.10.0

package `trust-quorum-types-versions` depends on `rand` with feature `os_rng` but `rand` does not have that feature.
 package `rand` does have feature `sys_rng`


failed to select a version for `rand` which could resolve this conflict

File name: Cargo.toml
Command failed: tools/renovate-post-upgrade.sh
+ set -o pipefail
+ set -o pipefail
+ case "${BINSTALL_VERSION:-}" in
++ mktemp -d
+ cd /tmp/tmp.VwL56Acf8E
+ '[' -z '' ']'
+ base_url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-
++ uname -s
+ os=Linux
+ '[' Linux = Darwin ']'
+ '[' Linux = Linux ']'
++ uname -m
+ machine=x86_64
+ '[' x86_64 = armv7l ']'
+ target=x86_64-unknown-linux-musl
+ '[' x86_64 = armv7 ']'
+ url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ do_curl https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ curl --retry 10 -A 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0' -L --proto =https --tlsv1.2 -sSf https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ tar -xvzf -
+ ./cargo-binstall --self-install
+ CARGO_HOME=/home/ubuntu/.cargo
+ case ":$PATH:" in
+ needs_cargo_home=1
+ '[' -n 1 ']'
+ '[' -n '' ']'
+ echo
+ printf '\033[0;31mYour path is missing %s, you might want to add it.\033[0m\n' /home/ubuntu/.cargo/bin
+ echo
Error: 
   0: �[91mbuilding package graph failed�[0m
   1: �[91m`cargo metadata` execution failed�[0m
   2: �[91m`cargo metadata` exited with an error:     Updating crates.io index
      error: failed to select a version for `rand`.
          ... required by package `trust-quorum-types-versions v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/trust-quorum/types/versions)`
          ... which satisfies path dependency `trust-quorum-types-versions` (locked to 0.1.0) of package `sled-agent-types-versions v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/sled-agent/types/versions)`
          ... which satisfies path dependency `sled-agent-types-versions` (locked to 0.1.0) of package `nexus-types v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/nexus/types)`
          ... which satisfies path dependency `nexus-types` (locked to 0.1.0) of package `nexus-config v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/nexus-config)`
          ... which satisfies path dependency `nexus-config` (locked to 0.1.0) of package `omicron-test-utils v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/test-utils)`
          ... which satisfies path dependency `omicron-test-utils` (locked to 0.1.0) of package `omicron-certificates v0.1.0 (/tmp/renovate/repos/github/oxidecomputer/omicron/certificates)`
      versions that meet the requirements `^0.10.0` (locked to 0.10.0) are: 0.10.0

      package `trust-quorum-types-versions` depends on `rand` with feature `os_rng` but `rand` does not have that feature.
       package `rand` does have feature `sys_rng`


      failed to select a version for `rand` which could resolve this conflict
      �[0m

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

@oxide-renovate oxide-renovate Bot force-pushed the renovate/crate-rand-vulnerability branch from 86c4429 to 46e2b7a Compare April 16, 2026 04:09
@oxide-renovate oxide-renovate Bot changed the title Update Rust crate rand to 0.10.0 [SECURITY] Update Rust crate rand to 0.10.0 [SECURITY] - autoclosed Apr 27, 2026
@oxide-renovate oxide-renovate Bot closed this Apr 27, 2026
@oxide-renovate oxide-renovate Bot deleted the renovate/crate-rand-vulnerability branch April 27, 2026 17:44
@oxide-renovate oxide-renovate Bot changed the title Update Rust crate rand to 0.10.0 [SECURITY] - autoclosed Update Rust crate rand to 0.10.0 [SECURITY] Apr 27, 2026
@oxide-renovate oxide-renovate Bot reopened this Apr 27, 2026
@oxide-renovate oxide-renovate Bot force-pushed the renovate/crate-rand-vulnerability branch 2 times, most recently from 46e2b7a to 0dea691 Compare April 27, 2026 18:54
@oxide-renovate oxide-renovate Bot changed the title Update Rust crate rand to 0.10.0 [SECURITY] Update Rust crate rand to 0.10.0 [SECURITY] - autoclosed Apr 27, 2026
@oxide-renovate oxide-renovate Bot closed this Apr 27, 2026
@oxide-renovate oxide-renovate Bot changed the title Update Rust crate rand to 0.10.0 [SECURITY] - autoclosed Update Rust crate rand to 0.10.0 [SECURITY] Apr 27, 2026
@oxide-renovate oxide-renovate Bot reopened this Apr 27, 2026
@oxide-renovate oxide-renovate Bot force-pushed the renovate/crate-rand-vulnerability branch 3 times, most recently from b443a85 to d33fa3c Compare April 30, 2026 01:18
@oxide-renovate oxide-renovate Bot force-pushed the renovate/crate-rand-vulnerability branch from d33fa3c to 15efc0f Compare April 30, 2026 20:19
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants