# GHSA-h7h7-6mx3-r89v: Fyrox has unsound usages of `Vec::from_raw_parts`

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-12-19T12:00:00.000Z
- Modified: 2026-09-10T03:50:22.753Z
- 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](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`.  

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](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).

(As written by GitHub Advisory Database.)

## Affected

- fyrox-core (crates.io): from 0.28.1 before 0.36; from 0.0.0-0 before 0.36.0

## References

- <https://github.com/FyroxEngine/Fyrox/issues/630> (report, web)
- <https://github.com/FyroxEngine/Fyrox/pull/662> (web)
- <https://github.com/FyroxEngine/Fyrox/commit/474e3b01a884366cdb7d704f7456ef692e992232> (web)
- <https://github.com/FyroxEngine/Fyrox> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0435.html> (advisory, web)
- <https://crates.io/crates/fyrox-core> (package)

## Sources

- GitHub Advisory Database: [GHSA-h7h7-6mx3-r89v](https://github.com/advisories/GHSA-h7h7-6mx3-r89v), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2024-0435](https://rustsec.org/advisories/RUSTSEC-2024-0435.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-h7h7-6mx3-r89v · Whole record: https://cve.day/GHSA-h7h7-6mx3-r89v.json · Rebuilt by cve.day 2026-11-25T22:56:43.235Z
