GHSA-h7h7-6mx3-r89v
JSON

low

Fyrox has unsound usages of `Vec::from_raw_parts`

Severity
low rating by GitHub
Published
Last changed
Also known as
RUSTSEC-2024-0435

Description

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.

In the issue, we develop a PoC to show passing struct type to transmute_vec_as_bytes could lead to undefined behavior with Vec::from_raw_parts.

The 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 branch, but still not on the latest release (0.28.1).

Affected

Product or packageVersionsReported by
fyrox-core (crates.io)from 0.28.1 before 0.36, from 0.0.0-0 before 0.36.0GitHub Advisory Database, RustSec Advisory Database

References

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-h7h7-6mx3-r89v changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2024-0435 changed 2025-10-28CC0-1.0