{"id":"CVE-2020-35904","aliases":["CVE-2020-35904","GHSA-m8h8-v6jh-c762","GHSA-v5m7-53cv-f3hx","RUSTSEC-2020-0052"],"related":["CVE-2020-15254"],"kind":"vulnerability","state":"published","title":"Incorrect buffer size in crossbeam-channel","summary":"An issue was discovered in the crossbeam-channel crate before 0.4.4 for Rust. It has incorrect expectations about the relationship between the memory allocation and how many iterator elements there are.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the crossbeam-channel crate before 0.4.4 for Rust. It has incorrect expectations about the relationship between the memory allocation and how many iterator elements there are.","source":"cvelist"},{"lang":"en","text":"The affected version of this crate's 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"### Impact\n\nThe affected version of this crate's 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.\n\n### Patches\n\nThis has been fixed in crossbeam-channel 0.4.4.\n\nWe recommend users to upgrade to 0.4.4.\n\n### References\n\nSee https://github.com/crossbeam-rs/crossbeam/pull/533, https://github.com/crossbeam-rs/crossbeam/issues/539, and https://github.com/RustSec/advisory-db/pull/425 for more details.\n\n### License\n\nThis advisory is in the public domain.","format":"markdown","source":"ghsa"},{"lang":"en","text":"The affected version of this crate's 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.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate crossbeam-channel versiones anteriores a 0.4.4 para Rust.&#xa0;Presenta expectativas incorrectas sobre la relación entre la asignación de memoria y cuántos elementos del iterador existen.","source":"nvd"}],"published":"2020-06-26T12:00:00.000Z","modified":"2026-07-08T06:27:45.679Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","score":2.1,"rating":"LOW"}],"cwes":["CWE-119","CWE-131","CWE-401"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.4.3","status":"affected","fixed":"0.4.4"}],"ecosystem":"crates.io","package":"crossbeam-channel","purl":"pkg:cargo/crossbeam-channel","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.4.3","status":"affected","fixed":"0.4.4"}],"ecosystem":"crates.io","package":"crossbeam-channel","purl":"pkg:cargo/crossbeam-channel","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.4.3","status":"affected","fixed":"0.4.4"}],"ecosystem":"crates.io","package":"crossbeam-channel","purl":"pkg:cargo/crossbeam-channel","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.4.4"}],"vendor":"crossbeam-channel_project","product":"crossbeam-channel","cpe":"cpe:2.3:a:crossbeam-channel_project:crossbeam-channel:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0052.html","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35904","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/crossbeam-rs/crossbeam/pull/533","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/crossbeam-rs/crossbeam","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/crossbeam-rs/crossbeam/security/advisories/GHSA-v5m7-53cv-f3hx","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15254","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/crossbeam-rs/crossbeam/issues/539","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/RustSec/advisory-db/pull/425","tags":["web"],"sources":["ghsa"]},{"url":"https://crates.io/crates/crossbeam-channel","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-35904","url":"https://www.cve.org/CVERecord?id=CVE-2020-35904","licence":"CVE Terms of Use","modified":"2024-08-04T17:16:13.125Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m8h8-v6jh-c762","url":"https://github.com/advisories/GHSA-m8h8-v6jh-c762","licence":"CC-BY-4.0","modified":"2023-11-08T04:02:35.713Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v5m7-53cv-f3hx","url":"https://github.com/advisories/GHSA-v5m7-53cv-f3hx","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:45.679Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2020-0052","url":"https://rustsec.org/advisories/RUSTSEC-2020-0052.html","licence":"CC0-1.0","modified":"2023-11-08T04:02:35.713Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-35904","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35904","licence":"Public domain","modified":"2026-06-17T03:14:34.493Z"}],"updatedAt":"2026-11-25T22:57:56.641Z","epss":{"score":0.00393,"percentile":0.35581,"date":"2026-12-01T12:00:22.000Z"}}