Advisory

RUSTSEC-2024-0435

Also known as: GHSA-h7h7-6mx3-r89v

Summary

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.

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

Severity

Not rated by the source.

Dates

Published
2024-12-19 12:00 UTC
Modified
2025-10-28 06:29 UTC

Affected packages and fixes

fyrox-core

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.36.0 (semver)

Fixed versions

0.36.0

Fix

  • Fixed version 0.36.0
    cargo update -p fyrox-core --precise 0.36.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences