Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. crossbeam-channel
  4. ›
  5. CVE-2020-35904

CVE-2020-35904: Incorrect buffer size in crossbeam-channel

August 25, 2021 (updated June 13, 2023)

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.

References

  • github.com/advisories/GHSA-m8h8-v6jh-c762
  • github.com/crossbeam-rs/crossbeam
  • github.com/crossbeam-rs/crossbeam/pull/533
  • nvd.nist.gov/vuln/detail/CVE-2020-35904
  • rustsec.org/advisories/RUSTSEC-2020-0052.html

Code Behaviors & Features

Detect and mitigate CVE-2020-35904 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.4.3 before 0.4.4

Fixed versions

  • 0.4.4

Solution

Upgrade to version 0.4.4 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-131: Incorrect Calculation of Buffer Size

Source file

cargo/crossbeam-channel/CVE-2020-35904.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:03 +0000.