GHSA-p7mj-xvxg-grff `out_reference::Out::from_raw` should be `unsafe`
A soundness bug in the Rust out_reference crate allows writing to invalid memory without unsafe blocks, potentially causing crashes or code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Not stated
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-p7mj-xvxg-grff?
GHSA-p7mj-xvxg-grff is a memory corruption vulnerability in out-reference, published on 20 Jan 2021.
Official description
Out::from_raw in affected versions allows writing a value to invalid memory address without requiring unsafe.
The soundness issue has been addressed by making Out::from_raw an unsafe function.
Which versions are affected by GHSA-p7mj-xvxg-grff?
3 open source packages ship an affected version, including out-reference.
| Package | Affected | Fixed in |
|---|---|---|
out-reference crates.io | From 0.1.0 | 0.2.0 |
out-reference crates.io | From 0.1.0 | 0.2.0 |
out-reference crates.io | From 0.1.0 | 0.2.0 |
How do I fix GHSA-p7mj-xvxg-grff?
Upgrade out-reference to 0.2.0 or later.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is GHSA-p7mj-xvxg-grff being exploited?
There is no known exploitation of GHSA-p7mj-xvxg-grff in the wild and no public exploit code.
Sources
Also known as RUSTSEC-2021-0152.