CVE-2020-15254: crossbeam-channel Undefined Behavior before v0.4.4
8.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.65412%
CWE
Published
8/25/2021
Updated
6/13/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
crossbeam-channel | rust | = 0.4.3 | 0.4.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the destructor of the bounded channel (array::Channel) incorrectly reconstructing a Vec using the element count as capacity. The implementation assumed Vec::from_iter's capacity matches element count, but this isn't guaranteed. When dropping, it used from_raw_parts with length==capacity, leading to incorrect deallocation. The fix in 0.4.4 replaced Vec with Box<[T]> which guarantees exact allocation size, confirming the vulnerable code was in Channel's destructor handling.