GitHub Advisoryadvisory · crates.io

GHSA-9wgh-vjj7-7433 Mutable reference with immutable provenance in image

MEDIUM Published 2021-08-25 Modified 2023-06-13 Official page ↗
Aliases
CVE-2020-35916
Ecosystem
crates.io
Packages
image
Severity
Moderate
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses
CWE-400
Reviewed
2021-08-19

Affected packages

• crates.io image: < 0.23.12 → fixed in 0.23.12

Description

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.

Related

Alias · CVE (1)

  • CVE-2020-35916 An issue was discovered in the image crate before 0.23.12 for Rust. vulnerability

Weakness · CWE (1)

  • CWE-400 Uncontrolled Resource Consumption weakness

References