All reports
Medium

Mutable reference with immutable provenance in image

Affected versions

Rust / Cargoimage
Affected versions
< 0.23.12
Fixed version
0.23.12

Exploitation

CVE-2020-35916

Probability of exploitation in the next 30 days: 0.39%

FIRST EPSS · 2026-11-21

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.

Links

Credits

  • tdunlap607