Lucene search

K
rustsecRustsecRUSTSEC-2021-0046
HistoryFeb 17, 2021 - 12:00 p.m.

misc::vec_with_size() can drop uninitialized memory if clone panics

2021-02-1712:00:00
rustsec.org
8

0.005 Low

EPSS

Percentile

76.0%

misc::vec_with_size creates a vector of the provided size and immediately
calls vec.set_len(size) on it, initially filling it with uninitialized memory.
It then inserts elements using vec[i] = value.clone().

If the value.clone() call panics, uninitialized items in the vector will be
dropped leading to undefined behavior.

CPENameOperatorVersion
telemetryeqany

0.005 Low

EPSS

Percentile

76.0%

Related for RUSTSEC-2021-0046