Skip to content

[GHSA-cq8v-f236-94qc] Rand is unsound with a custom logger using rand::rng()#7481

Open
nbagnard wants to merge 1 commit intonbagnard/advisory-improvement-7481from
nbagnard-GHSA-cq8v-f236-94qc
Open

[GHSA-cq8v-f236-94qc] Rand is unsound with a custom logger using rand::rng()#7481
nbagnard wants to merge 1 commit intonbagnard/advisory-improvement-7481from
nbagnard-GHSA-cq8v-f236-94qc

Conversation

@nbagnard
Copy link
Copy Markdown

Updates

  • Affected products

Comments
The patch was backported to rand 0.8.6.
See updated "Patched" section in https://rustsec.org/advisories/RUSTSEC-2026-0097.html and rand 0.8.6 release notes https://github.com/rust-random/rand/releases/tag/0.8.6

Copilot AI review requested due to automatic review settings April 21, 2026 20:10
@github-actions github-actions Bot changed the base branch from main to nbagnard/advisory-improvement-7481 April 21, 2026 20:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the GitHub-reviewed advisory for GHSA-cq8v-f236-94qc to reflect newly clarified affected version ranges and the backported fix in rand 0.8.6.

Changes:

  • Updates the affected range start for the 0.9.x line (introduce 0.9.0 → fixed 0.9.3).
  • Adds a new affected range for rand 0.7.0 → fixed 0.8.6 (backport).
  • Bumps the advisory modified timestamp.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to 24
"introduced": "0.9.0"
},
{
"fixed": "0.9.3"
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The advisory mixes an ECOSYSTEM range that is fixed at 0.9.3 with an explicit vulnerable versions entry for 0.10.0. If 0.10.0 is intended to be vulnerable, it’s clearer (and typically easier for tooling) to represent it as an additional ranges[].events segment (e.g., an introduced: "0.10.0" event, optionally with a fixed if known) rather than (or in addition to) a standalone versions list.

Copilot uses AI. Check for mistakes.
Comment on lines 48 to 50
"versions": [
"0.10.0"
]
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The advisory mixes an ECOSYSTEM range that is fixed at 0.9.3 with an explicit vulnerable versions entry for 0.10.0. If 0.10.0 is intended to be vulnerable, it’s clearer (and typically easier for tooling) to represent it as an additional ranges[].events segment (e.g., an introduced: "0.10.0" event, optionally with a fixed if known) rather than (or in addition to) a standalone versions list.

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +69
{
"package": {
"ecosystem": "crates.io",
"name": "rand"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0.7.0"
},
{
"fixed": "0.8.6"
}
]
}
]
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The PR adds a second affected entry for the same package (rand). If the existing affected array already contains a rand entry (it appears to, given the other rand-line changes), consider consolidating into a single affected item with multiple ranges blocks (one per maintenance line: 0.7–0.8.6, 0.9–0.9.3, etc.). This reduces duplication and makes future edits (e.g., adding a 0.10.x fix) less error-prone.

Copilot uses AI. Check for mistakes.
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