Skip to content

Commit 75a51cb

Browse files
authored
Merge pull request #425 from taiki-e/crossbeam-533
Add advisory for UB in crossbeam-channel 0.4.3
2 parents 8c4b6b7 + c764af8 commit 75a51cb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "crossbeam-channel"
5+
categories = ["memory-corruption"]
6+
date = "2020-06-26"
7+
url = "https://github.com/crossbeam-rs/crossbeam/pull/533"
8+
9+
[versions]
10+
patched = [">= 0.4.4"]
11+
unaffected = ["< 0.4.3"]
12+
```
13+
14+
# Undefined Behavior in bounded channel
15+
16+
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.

0 commit comments

Comments
 (0)