{"id":"RUSTSEC-2021-0039","summary":"panic in user-provided `Endian` impl triggers double drop of T","details":"Affected versions of the crate does not guard against panic from user-provided impl of `Endian` trait, which is a safe trait that users can implement.\nIf a user-provided implementation of the `Endian` trait panics, double-drop is triggered due to the duplicated ownership of `T` created by `ptr::read()`.\n\nDouble-drop (or double free) can cause memory corruption in the heap.","aliases":["CVE-2021-29929","GHSA-vpw8-43wm-rxw5"],"modified":"2023-11-08T04:05:43.576898Z","published":"2021-01-04T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/endian_trait"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2021-0039.html"},{"type":"REPORT","url":"https://gitlab.com/myrrlyn/endian_trait/-/issues/1"}],"affected":[{"package":{"name":"endian_trait","ecosystem":"crates.io","purl":"pkg:cargo/endian_trait"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"arch":[],"functions":[],"os":[]}},"database_specific":{"cvss":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","informational":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0039.json","categories":["memory-corruption"]}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}