{"id":"RUSTSEC-2021-0046","summary":"misc::vec_with_size() can drop uninitialized memory if clone panics","details":"`misc::vec_with_size` creates a vector of the provided `size` and immediately\ncalls `vec.set_len(size)` on it, initially filling it with uninitialized memory.\nIt then inserts elements using `vec[i] = value.clone()`.\n\nIf the `value.clone()` call panics, uninitialized items in the vector will be\ndropped leading to undefined behavior.\n\n## Withdrawal\n\nThis advisory has been withdrawn because the above unsoundness cannot be triggered in safe code by dependents of the crate, as the `Clone` generic of private function `misc::vec_with_size` only instantiates to primitive types in public functions, which is impossible to panic.","aliases":["CVE-2021-29937","GHSA-hpcx-3pw8-g3j2"],"modified":"2026-08-29T12:00:00Z","published":"2021-02-17T12:00:00Z","withdrawn":"2026-08-29T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/telemetry"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2021-0046.html"},{"type":"REPORT","url":"https://github.com/Yoric/telemetry.rs/issues/45"}],"affected":[{"package":{"name":"telemetry","ecosystem":"crates.io","purl":"pkg:cargo/telemetry"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"ecosystem_specific":{"affects":{"arch":[],"os":[],"functions":[]},"affected_functions":null},"database_specific":{"cvss":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0046.json","categories":["memory-corruption"]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}