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

CVE-2020-15254: crossbeam-channel Undefined Behavior before v0.4.4

August 25, 2021 (updated August 10, 2022)

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/RustSec/advisory-db/pull/425
  • github.com/advisories/GHSA-v5m7-53cv-f3hx
  • github.com/crossbeam-rs/crossbeam
  • github.com/crossbeam-rs/crossbeam/issues/539
  • github.com/crossbeam-rs/crossbeam/pull/533
  • github.com/crossbeam-rs/crossbeam/security/advisories/GHSA-v5m7-53cv-f3hx
  • nvd.nist.gov/vuln/detail/CVE-2020-15254
  • rustsec.org/advisories/RUSTSEC-2020-0052.html

Code Behaviors & Features

Detect and mitigate CVE-2020-15254 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, version 0.4.3

Fixed versions

  • 0.4.4

Solution

Upgrade to version 0.4.4 or above.

Impact 8.1 HIGH

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

Learn more about CVSS

Weakness

  • CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
  • CWE-401: Missing Release of Memory after Effective Lifetime

Source file

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

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 May 2025 12:15:57 +0000.