CVE-2020-15254
JSON

8.1high

Undefined Behavior in bounded Crossbeam channel

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
2.70% (higher than 86% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-m8h8-v6jh-c762GHSA-v5m7-53cv-f3hxRUSTSEC-2020-0052

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.

Affected

Product or packageVersionsReported by
crossbeam-rs crossbeam< 0.4.4CVE List
crossbeam-channel (crates.io)from 0.4.3 before 0.4.4GitHub Advisory Database, RustSec Advisory Database
crossbeam_project crossbeambefore 0.4.4NVD

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

GitHub Advisory Database

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.

GitHub Advisory Database
Impact

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.

Patches

This has been fixed in crossbeam-channel 0.4.4.

We recommend users to upgrade to 0.4.4.

References

See 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.

License

This advisory is in the public domain.

RustSec Advisory Database

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.

NVD (es)

Crossbeam es un conjunto de herramientas para programación concurrente.&#xa0;En crossbeam-channel versiones anteriores a 0.4.4, el canal acotado asume inapropiadamente que "Vec::from_iter" ha asignado una capacidad igual a la cantidad de elementos iteradores.&#xa0;"Vec::from_iter" en realidad no garantiza eso y puede asignar memoria extra.&#xa0;El destructor del canal "bounded" reconstruye "Vec" a partir del puntero sin procesar basándose en los supuestos incorrectos descritos anteriormente.&#xa0;Esto no es correcto y causa una desasignación con la capacidad incorrecta cuando "VVec::from_iter" ha asignado diferentes tamaños con el número de elementos del iterador.&#xa0;Esto ha sido corregido en crossbeam-channel versión 0.4.4

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2020-15254 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-m8h8-v6jh-c762 changed 2023-11-08CC-BY-4.0
GitHub Advisory DatabaseGHSA-v5m7-53cv-f3hx changed 2026-07-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2020-0052 changed 2023-11-08CC0-1.0
NVDCVE-2020-15254 changed 2026-06-17Public domain