From b6194fc17d9747b53cae8533f4e411d9dad3b005 Mon Sep 17 00:00:00 2001 From: Ali Jaafer <93264687+i5d6@users.noreply.github.com> Date: Sat, 3 May 2025 23:25:52 +0300 Subject: [PATCH] Mio's tokens for named pipes may be delivered after deregistration Impact When using named pipes on Windows, mio will under some circumstances return invalid tokens that correspond to named pipes that have already been deregistered from the mio registry. The impact of this vulnerability depends on how mio is used. For some applications, invalid tokens may be ignored or cause a warning or a crash. On the other hand, for applications that store pointers in the tokens, this vulnerability may result in a use-after-free. For users of Tokio, this vulnerability is serious and can result in a use-after-free in Tokio. The vulnerability is Windows-specific, and can only happen if you are using named pipes. Other IO resources are not affected. Affected versions This vulnerability has been fixed in mio v0.8.11. All versions of mio between v0.7.2 and v0.8.10 are vulnerable. Tokio is vulnerable when you are using a vulnerable version of mio AND you are using at least Tokio v1.30.0. Versions of Tokio prior to v1.30.0 will ignore invalid tokens, so they are not vulnerable. Workarounds Vulnerable libraries that use mio can work around this issue by detecting and ignoring invalid tokens. --- rust/Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 5305f9f6..50d46229 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -996,7 +996,7 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [