GHSA-h7h7-6mx3-r89v: Fyrox has unsound usages of `Vec :from_raw_parts` Vulnerability
LOWGHSA-h7h7-6mx3-r89v is a LOW :from_raw_parts` vulnerability (General Security Weakness) affecting Fyrox has unsound usages of `Vec libraries in the crates.io ecosystem. The issue involves :from_raw_parts`. Remediation is available by upgrading affected packages to version 0.36.
GHSA-h7h7-6mx3-r89v at a Glance
How to Fix GHSA-h7h7-6mx3-r89v
To remediate this vulnerability, upgrade all affected Fyrox has unsound usages of `Vec 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 fyrox-core to 0.36
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for fyrox-core
How to Check if You Are Affected
To determine whether your application is affected by GHSA-h7h7-6mx3-r89v, inspect your project dependencies for Fyrox has unsound usages of `Vec:
inspect dependencies for fyrox-core
Analyze the terminal output to locate any version of Fyrox has unsound usages of `Vec in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.36), 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 Fyrox has unsound usages of `Vec, 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-h7h7-6mx3-r89v Affected Fyrox has unsound usages of `Vec Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fyrox-core
|
crates.io |
≥ 0.28.1
< 0.36
|
0.36
|
References
Frequently Asked Questions
What is GHSA-h7h7-6mx3-r89v?
Which Fyrox has unsound usages of `Vec versions are affected?
What version fixes GHSA-h7h7-6mx3-r89v?
Is fyrox-core affected?
What CWE is associated with GHSA-h7h7-6mx3-r89v?
How can I check crates.io dependencies for GHSA-h7h7-6mx3-r89v?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h7h7-6mx3-r89v",
"modified" : "2025-02-14T17:31:17Z",
"published" : "2025-02-14T17:31:16Z",
"aliases" : [ ],
"summary" : "Fyrox has unsound usages of `Vec::from_raw_parts` ",
"details" : "The library provides a public safe API `transmute_vec_as_bytes`, which incorrectly assumes that any generic type `T` could have stable layout, causing to uninitialized memory exposure if the users pass any types with padding bytes as `T` and cast it to `u8` pointer. \n\nIn the [issue](https://github.com/FyroxEngine/Fyrox/issues/630), we develop a PoC to show passing struct type to `transmute_vec_as_bytes` could lead to undefined behavior with `Vec::from_raw_parts`. \n\nThe developers provide a patch by changing trait of `Copy` to `Pod`, which can make sure `T` should be plain data. This was patched in the latest version of [master](https://github.com/FyroxEngine/Fyrox/blob/3f9ad6f9667047dac051b0e97d544e5b38e5ae72/fyrox-core/src/lib.rs#L351-L360) branch, but still not on the latest release (0.28.1).",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "fyrox-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.28.1"
}, {
"fixed" : "0.36"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FyroxEngine/Fyrox/issues/630"
}, {
"type" : "WEB",
"url" : "https://github.com/FyroxEngine/Fyrox/pull/662"
}, {
"type" : "WEB",
"url" : "https://github.com/FyroxEngine/Fyrox/commit/474e3b01a884366cdb7d704f7456ef692e992232"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FyroxEngine/Fyrox"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0435.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-02-14T17:31:16Z",
"nvd_published_at" : null
}
}