Lucene search

K
osvGoogleOSV:RUSTSEC-2020-0073
HistoryNov 12, 2020 - 12:00 p.m.

Mutable reference with immutable provenance

2020-11-1212:00:00
Google
osv.dev
13
reference
struct
slice
immutable
mutable
pointer
exploitable
llvm
rust
zulip
mitigating
bug

EPSS

0

Percentile

12.8%

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 suggests that the unoptimized
generated LLVM IR does not contain any UB itself, effectively mitigating
further effects.

EPSS

0

Percentile

12.8%