GHSA-9c9f-7x9p-4wqp
high
A malicious coder can get unsound access to TCell or TLCell memory
- Severity
- high rating by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2022-0007
Description
This is impossible to do by accident, but by carefully constructing
marker types to be covariant, a malicious coder can cheat the
singleton check in TCellOwner and TLCellOwner, giving unsound
access to cell memory. This could take the form of getting two
mutable references to the same memory, or a mutable reference and an
immutable reference.
The fix is for the crate to internally force the marker type to be invariant. This blocks the conversion between covariant types which Rust normally allows.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| qcell (crates.io) | before 0.4.3, from 0.0.0-0 before 0.4.3 | GitHub Advisory Database, RustSec Advisory Database |
References
| https://github.com/uazu/qcell/issues/20 | report, web | |
| https://github.com/uazu/qcell | package | |
| https://rustsec.org/advisories/RUSTSEC-2022-0007.html | advisory, web | |
| https://crates.io/crates/qcell | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-9c9f-7x9p-4wqp changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2022-0007 changed 2023-11-08 | CC0-1.0 |