{"id":"CVE-2020-15254","published":"2020-10-16T17:05:24Z","modified":"2024-08-04T13:08:23Z","title":"Undefined Behavior in bounded Crossbeam channel","vendor":"crossbeam-rs","product":"crossbeam","tier":"tail","description":{"text":"Crossbeam is a set of tools for concurrent programming. In crossbeam-channel before version 0.4.4, the bounded channel incorrectly assumes that `Vec::from_iter` has allocated capacity that same as the number of iterator elements. `Vec::from_iter` does not actually guarantee that and may allocate extra memory. The destructor of the `bounded` channel reconstructs `Vec` from the raw pointer based on the incorrect assumes described above. This is unsound and causing deallocation with the incorrect capacity when `Vec::from_iter` has allocated different sizes with the number of iterator elements. This has been fixed in crossbeam-channel 0.4.4.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02701,"percentile":0.8629,"provenance":"source"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"references":[{"url":"https://github.com/crossbeam-rs/crossbeam/security/advisories/GHSA-v5m7-53cv-f3hx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/crossbeam-rs/crossbeam/issues/539","tags":["x_refsource_MISC"]},{"url":"https://github.com/crossbeam-rs/crossbeam/pull/533","tags":["x_refsource_MISC"]},{"url":"https://github.com/RustSec/advisory-db/pull/425","tags":["x_refsource_MISC"]}],"priority":{"score":22.9,"factors":[{"name":"EPSS percentile","points":17.26},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"crossbeam-rs","affectedVersions":[{"vendor":"crossbeam-rs","product":"crossbeam","versions":["< 0.4.4"]}],"affected":[{"ecosystem":"crates.io","package":"crossbeam-channel","vulnerableRanges":[">=0.4.3, <0.4.4"],"patched":["0.4.4"],"from":["GHSA-v5m7-53cv-f3hx","RUSTSEC-2020-0052"],"provenance":"source"}],"summary":{"text":"The bounded channel in crossbeam-channel, part of the crossbeam concurrency toolkit, assumes that the allocated capacity of a Vec created via Vec::from_iter matches its element count, which the standard library does not guarantee. Its destructor reconstructs the Vec from a raw pointer using that wrong capacity, so deallocation can occur with an incorrect size, and an attacker able to reach the affected code path over the network with no privileges and with an elevated attack complexity could cause memory corruption with high confidentiality, integrity and availability impact.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:40:30Z"},"euvd":{"id":"EUVD-2021-1883","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-crossbeam-rs-crossbeam-cve-2020-15254","children":[{"from":"CVE-2020-15254","to":"CVE-2020-35904","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-v5m7-53cv-f3hx","via":"reference","url":"https://github.com/crossbeam-rs/crossbeam/security/advisories/GHSA-v5m7-53cv-f3hx"}]}]}}