RUSTSEC-2020-0073
Dashboard / Vulnerabilities / RUSTSEC-2020-0073
RUSTSEC-2020-0073
Summary: Mutable reference with immutable provenance
Details: A mutable reference to a struct was constructed by dereferencing a pointer obtained from `slice::as_ptr`. Instead, `slice::as_mut_ptr` should have been called on the mutable slice argument. The former performs an implicit reborrow as an immutable shared reference which does not allow writing through the derived pointer. There is no evidence for miscompilation, exploitable or otherwise, caused by this bug. [Further investigation on Zulip][Zulip] suggests that the unoptimized generated LLVM IR does not contain any UB itself, effectively mitigating further effects. [Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/146229-wg-secure-code/topic/Implications.20of.20using.20.60slice.3A.3Aas_ptr.60.20for.20mutable.20access/near/216499472
References: https://crates.io/crates/image, https://rustsec.org/advisories/RUSTSEC-2020-0073.html, https://github.com/image-rs/image/issues/1357
Affected packages
Package
Name: image
Purl: pkg:cargo/image
Affected ranges
Type: SEMVER
Events:
