CVE-2020-35904:
Incorrect buffer size in crossbeam-channel
5.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.17681%
CWE
Published
8/25/2021
Updated
6/13/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
crossbeam-channel | rust | >= 0.4.3, < 0.4.4 | 0.4.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key functions: 1) The destructor (drop implementation) assumes Vec capacity equals element count when reconstructing from raw pointers, but Vec::from_iter doesn't guarantee this. 2) The channel initialization uses Vec::from_iter which may overallocate. The combination leads to incorrect capacity calculation during deallocation. The GitHub PR #533 specifically replaced Vec with Box<[T]> in these locations to fix the issue, confirming these functions' involvement.