mio is vulnerable to Use-After-Free
62
CVE Score
Medium
Use-After-Free
mio's Windows named pipe backend submits overlapped ReadFile/WriteFile operations and then calls GetOverlappedResult to check their outcome. When that call reports anything other than ERROR_IO_INCOMPLETE, the code returns an error even though the operation was already submitted and Windows has queued a completion packet, such as when the other end of the pipe disconnects. schedule_read and schedule_write reserve the pipe state with mem::forget only when submission succeeds, so this premature error lets the completion callback free that state while the caller still uses it, causing a use-after-free. The fix distinguishes submitted operations from ones that never queued and returns Ok(None) for submitted operations so their state stays alive until the real completion arrives.
Upgrade the mio library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you use Windows named pipes through mio::windows::NamedPipe, including through Tokio.
0.7.2 - 1.2.3
Fixed in 1.2.4mio is vulnerable to Use-After-Free in versions 0.7.2 - 1.2.3.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.