GHSA-p6gj-gpc8-f8xw: Nanorand Aliased Mutable References From `tls_rand` Vulnerability
MODERATEGHSA-p6gj-gpc8-f8xw is a MODERATE aliased mutable references from `tls_rand` vulnerability (General Security Weakness) affecting Nanorand libraries in the crates.io ecosystem. The issue involves aliased mutable references from `tls_rand` & `tlswyrand`. Remediation is available by upgrading affected packages to version 0.6.1.
GHSA-p6gj-gpc8-f8xw at a Glance
How to Fix GHSA-p6gj-gpc8-f8xw
To remediate this vulnerability, upgrade all affected Nanorand dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade nanorand to 0.6.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for nanorand
How to Check if You Are Affected
To determine whether your application is affected by GHSA-p6gj-gpc8-f8xw, inspect your project dependencies for Nanorand:
inspect dependencies for nanorand
Analyze the terminal output to locate any version of Nanorand in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Nanorand, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-p6gj-gpc8-f8xw Affected Nanorand Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nanorand
|
crates.io |
≥ 0.5.0
< 0.6.1
|
0.6.1
|
References
Frequently Asked Questions
What is GHSA-p6gj-gpc8-f8xw?
Which Nanorand versions are affected?
What version fixes GHSA-p6gj-gpc8-f8xw?
Is nanorand affected?
What CWE is associated with GHSA-p6gj-gpc8-f8xw?
How can I check crates.io dependencies for GHSA-p6gj-gpc8-f8xw?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p6gj-gpc8-f8xw",
"modified" : "2022-06-17T00:13:24Z",
"published" : "2022-06-17T00:13:24Z",
"aliases" : [ ],
"summary" : "Aliased mutable references from `tls_rand` & `TlsWyRand`",
"details" : "`TlsWyRand`'s implementation of `Deref` unconditionally dereferences a raw pointer, and returns \nmultiple mutable references to the same object, which is undefined behavior.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "nanorand"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.0"
}, {
"fixed" : "0.6.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Absolucy/nanorand-rs/issues/28"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Absolucy/nanorand-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0114.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:13:24Z",
"nvd_published_at" : null
}
}