{"id":"CVE-2020-35904","aliases":["DEBIAN-CVE-2020-35904","EUVD-2021-1794","GHSA-m8h8-v6jh-c762","GHSA-v5m7-53cv-f3hx","RUSTSEC-2020-0052","UBUNTU-CVE-2020-35904"],"status":"published","title":"Incorrect buffer size in crossbeam-channel","description":"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.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00393,"percentile":0.33738,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-119","CWE-131","CWE-401"],"published":"2020-06-26T12:00:00Z","modified":"2026-10-26T12:00:52Z","fixes":[{"ecosystem":"crates.io","package":"crossbeam-channel","fixed_in":["0.4.4"],"sources":["ghsa"]},{"ecosystem":"Debian:12","package":"rust-crossbeam-channel","fixed_in":["0.4.4-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"rust-crossbeam-channel","fixed_in":["0.4.4-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"rust-crossbeam-channel","fixed_in":["0.4.4-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"crossbeam-channel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.4.3"},{"fixed":"0.4.4"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"rust-crossbeam-channel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.4-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"rust-crossbeam-channel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.4-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"rust-crossbeam-channel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.4-1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"crossbeam-channel","ranges":[{"type":"SEMVER","events":[{"introduced":"0.4.3"},{"fixed":"0.4.4"}]}],"bundled":2},{"source":"osv","ecosystem":"crates.io","package":"crossbeam-channel","ranges":[{"type":"SEMVER","events":[{"introduced":"0.4.3"},{"fixed":"0.4.4"}]}],"versions":["0.4.3"],"bundled":2},{"source":"osv","ecosystem":"crates.io","package":"crossbeam-channel","ranges":[{"type":"SEMVER","events":[{"introduced":"0.4.3"},{"fixed":"0.4.4"}]}],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"rust-crossbeam-channel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.9-2"]}],"products":[{"vendor":"crossbeam-channel_project","product":"crossbeam-channel"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0052.html","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","advisory","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35904","tags":["advisory"]},{"url":"https://github.com/crossbeam-rs/crossbeam/pull/533","tags":["fix","web","report"]},{"url":"https://github.com/advisories/GHSA-m8h8-v6jh-c762"},{"url":"https://github.com/crossbeam-rs/crossbeam/security/advisories/GHSA-v5m7-53cv-f3hx","tags":["advisory","web"]},{"url":"https://github.com/RustSec/advisory-db/pull/425","tags":["fix","web"]},{"url":"https://github.com/crossbeam-rs/crossbeam/issues/539","tags":["evidence","web"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-35904","tags":["advisory"]},{"url":"https://github.com/crossbeam-rs/crossbeam","tags":["package"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15254","tags":["advisory"]},{"url":"https://crates.io/crates/crossbeam-channel","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2020-35904","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-35904","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2020-35904","description":"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.","status":"published","published":"2020-12-31T08:21:39Z","modified":"2024-08-04T17:16:13.125Z","updated_at":"2026-11-02T14:35:57.975444Z"}],"euvd":[{"id":"EUVD-2021-1794","description":"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.","status":"published","published":"2020-12-31T08:21:39Z","modified":"2024-08-04T17:16:13Z","updated_at":"2026-11-03T03:07:04.595509Z"}],"ghsa":[{"id":"GHSA-m8h8-v6jh-c762","title":"Incorrect buffer size in crossbeam-channel","description":"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.","status":"published","published":"2021-08-25T20:49:43Z","modified":"2023-06-13T17:12:10Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-131"],"updated_at":"2026-11-02T14:36:53.654352Z"}],"nvd":[{"id":"CVE-2020-35904","description":"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.","status":"published","published":"2020-12-31T09:15:15.067Z","modified":"2026-06-17T03:14:34.493Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":2.1,"vector":"AV:L/AC:L/Au:N/C:N/I:N/A:P","level":"low","assessor":"primary"}],"updated_at":"2026-11-02T14:06:28.340168Z"}],"osv":[{"id":"CVE-2020-15254","description":"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.","status":"published","published":"2020-10-16T17:15:12.057Z","modified":"2026-10-20T10:51:53.768181968Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:14.828228Z"},{"id":"CVE-2020-35904","description":"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.","status":"published","published":"2020-12-31T09:15:15.067Z","modified":"2026-10-24T10:30:43.59684171Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:16.612899Z"},{"id":"DEBIAN-CVE-2020-35904","description":"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.","status":"published","published":"2020-12-31T09:15:15.067Z","modified":"2026-10-26T12:00:52.035643049Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:45:34.019707Z"},{"id":"GHSA-m8h8-v6jh-c762","title":"Incorrect buffer size in crossbeam-channel","description":"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.","status":"published","published":"2021-08-25T20:49:43Z","modified":"2023-11-08T04:02:35.713139Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-131"],"updated_at":"2026-11-02T15:46:51.463834Z"},{"id":"GHSA-v5m7-53cv-f3hx","title":"crossbeam-channel Undefined Behavior before v0.4.4","description":"### 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.","status":"published","published":"2021-08-25T21:01:13Z","modified":"2026-07-08T06:27:45.679651074Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-119","CWE-401"],"updated_at":"2026-11-02T15:46:56.639206Z"},{"id":"UBUNTU-CVE-2020-35904","description":"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.","status":"published","published":"2020-12-31T09:15:00Z","modified":"2025-10-24T04:48:58Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:25.179924Z"},{"id":"RUSTSEC-2020-0052","title":"Undefined Behavior in bounded channel","description":"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.","status":"published","published":"2020-06-26T12:00:00Z","modified":"2023-11-08T04:02:35.713139Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
