Files
vuln-osv/data/crates.io/RUSTSEC-2021-0046.json
T

1 line
1.7 KiB
JSON

{"schema_version":"1.9.0","id":"RUSTSEC-2021-0046","published":"2021-02-17T12:00:00Z","modified":"2026-08-29T12:00:00Z","withdrawn":"2026-08-29T12:00:00Z","aliases":["CVE-2021-29937","GHSA-hpcx-3pw8-g3j2"],"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.","affected":[{"package":{"name":"telemetry","ecosystem":"crates.io","purl":"pkg:cargo/telemetry"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"arch":[],"functions":[],"os":[]}},"database_specific":{"categories":["memory-corruption"],"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"}}],"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"}],"database_specific":{"license":"CC0-1.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"}]}