From 60f9e2c2964c3cbd3ee52d9ca3a78906278217d1 Mon Sep 17 00:00:00 2001 From: CjS77 Date: Tue, 7 Jun 2022 10:12:36 +0100 Subject: [PATCH] bug: update crossbeam-channel 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 crossbeam-rs/crossbeam#533, crossbeam-rs/crossbeam#539, and rustsec/advisory-db#425 for more details. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index f881083..2e79176 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" [dependencies] arc-swap = "0.4.2" futures = { version = "^0.3.1" } -crossbeam-channel = "0.3.9" +crossbeam-channel = "0.5.4" log = "0.4.6" [dev-dependencies]