GHSA-mmc9-pwm7-qj5w

Suggest an improvement
Source
https://github.com/advisories/GHSA-mmc9-pwm7-qj5w
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-mmc9-pwm7-qj5w/GHSA-mmc9-pwm7-qj5w.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-mmc9-pwm7-qj5w
Aliases
Published
2021-08-25T20:56:50Z
Modified
2023-11-08T04:03:10.161773Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Unaligned memory access in rand_core
Details

Impact

Affected versions of this crate violated alignment when casting byte slices to integer slices, resulting in undefined behavior. rand_core::BlockRng::next_u64 and rand_core::BlockRng::fill_bytes are affected.

Patches

The flaw was corrected by Ralf Jung and Diggory Hardy for rand_core >= 0.4.2.

Workarounds

None.

References

See Rand's changelog.

For more information

If you have any questions or comments about this advisory, open an issue in the Rand repository.

Database specific
{
    "nvd_published_at": null,
    "github_reviewed_at": "2021-08-18T20:45:24Z",
    "severity": "CRITICAL",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-704"
    ]
}
References

Affected packages

crates.io / rand_core

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.4.0
Fixed
0.4.2

Ecosystem specific

{
    "affected_functions": [
        "rand_core::BlockRng::fill_bytes",
        "rand_core::BlockRng::next_u64"
    ]
}

crates.io / rand_core

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.3.1

Ecosystem specific

{
    "affected_functions": [
        "rand_core::BlockRng::fill_bytes",
        "rand_core::BlockRng::next_u64"
    ]
}