Skip to content

Update Rust crate rand to v0.8.6 [SECURITY] - autoclosed#74

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/crate-rand-vulnerability
Closed

Update Rust crate rand to v0.8.6 [SECURITY] - autoclosed#74
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/crate-rand-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
rand (source) dev-dependencies patch 0.8.50.8.6
rand (source) dependencies patch 0.8.50.8.6

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.8.6

Compare Source

What's Changed

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

Changes
  • Drop the experimental simd_support feature.

New Contributors

Full Changelog: rust-random/rand@0.8.5...0.8.6


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 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 these updates again.


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

This PR was generated by Mend Renovate. View the repository job log.

@xtqqczze

Copy link
Copy Markdown
Contributor

Duplicate of #73

@xtqqczze

Copy link
Copy Markdown
Contributor

GHSA-cq8v-f236-94qc tracked by #70

@renovate renovate Bot force-pushed the renovate/crate-rand-vulnerability branch from df498f5 to efd88ba Compare April 15, 2026 06:58
@renovate renovate Bot changed the title Update Rust crate rand to v0.9.3 [SECURITY] Update Rust crate rand to v0.9.3 [SECURITY] - autoclosed Apr 22, 2026
@renovate renovate Bot closed this Apr 22, 2026
@renovate renovate Bot deleted the renovate/crate-rand-vulnerability branch April 22, 2026 22:51
@renovate renovate Bot changed the title Update Rust crate rand to v0.9.3 [SECURITY] - autoclosed Update Rust crate rand to v0.8.6 [SECURITY] Apr 23, 2026
@renovate renovate Bot reopened this Apr 23, 2026
@renovate renovate Bot force-pushed the renovate/crate-rand-vulnerability branch 2 times, most recently from efd88ba to af60664 Compare April 23, 2026 02:02
@codspeed-hq

codspeed-hq Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 20 untouched benchmarks
⏩ 9 skipped benchmarks1


Comparing renovate/crate-rand-vulnerability (af60664) with main (aaeab12)

Open in CodSpeed

Footnotes

  1. 9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@xtqqczze

Copy link
Copy Markdown
Contributor

Duplicate of #78

@renovate renovate Bot changed the title Update Rust crate rand to v0.8.6 [SECURITY] Update Rust crate rand to v0.8.6 [SECURITY] - autoclosed Apr 23, 2026
@renovate renovate Bot closed this Apr 23, 2026
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.

1 participant