cargo / mio

mio

cargo

Lightweight non-blocking I/O.

Audits

PE Patrick Elsen 2026-06-02

mio@1.2.1 · 3 findings

Audit of mio 1.2.1, the low-level non-blocking I/O library underlying tokio. Matches upstream Git byte-for-byte. No build script, no crypto, no subprocess spawn, no env reads. Capability surface is the kernel sockets/pipes/readiness APIs the crate exists to wrap, with ~114 tightly-scoped unsafe blocks each wrapping a single OS call. Three low-severity findings: a documented-but-not-present epoll race, scope statement on the soundness boundary, and the panicking shell backend when os-poll is off.

concurrency-documentedconcurrency-safefilesystem-safehas-binarieshas-build-exechas-fuzz-testshas-install-exechas-integration-testshas-property-testshas-unit-testsimpl-algorithmimpl-concurrencyimpl-cryptoimpl-datastructureimpl-interpreterimpl-jitimpl-parserimpl-protocolis-benignnetwork-safeunsafe-documentedunsafe-minimalunsafe-safeunsafe-testeduses-concurrencyuses-cryptouses-environmentuses-execuses-filesystemuses-interpreteruses-jituses-networkuses-unsafe
PE Patrick Elsen 2026-05-27

mio@1.2.0 · 1 finding

mio 1.2.0 is a cross-platform non-blocking I/O event loop backed by epoll, kqueue, poll(2), WASI poll_oneoff, and Windows IOCP/AFD. One medium-severity finding: 93 of 114 unsafe blocks lack SAFETY comments, reducing auditability. No soundness or security issues were found in the selector implementations, Waker backends, fd-lifetime management, or IOCP bridging layer.

concurrency-documentedconcurrency-impl-correctconcurrency-impl-documentedconcurrency-impl-safeconcurrency-impl-testedconcurrency-safefilesystem-safehas-binarieshas-build-exechas-fuzz-testshas-install-exechas-integration-testshas-property-testshas-unit-testsimpl-algorithmimpl-concurrencyimpl-cryptoimpl-datastructureimpl-interpreterimpl-jitimpl-parserimpl-protocolis-benignnetwork-safenetwork-secureunsafe-documentedunsafe-minimalunsafe-safeunsafe-testeduses-concurrencyuses-cryptouses-environmentuses-execuses-filesystemuses-interpreteruses-jituses-networkuses-unsafe
PE Patrick Elsen 2026-05-27

mio@0.8.11 · 1 finding

mio 0.8.11 wraps epoll, kqueue, and IOCP behind a unified non-blocking I/O event API. One medium-severity quality finding: 145 of 146 unsafe blocks carry no SAFETY comment, though the invariants were verified by inspection. The unsafe sites are sound; the IOCP overlapped-pointer ownership protocol is correct but convention-reliant.

concurrency-documentedconcurrency-impl-correctconcurrency-impl-documentedconcurrency-impl-safeconcurrency-impl-testedconcurrency-safefilesystem-safehas-binarieshas-build-exechas-fuzz-testshas-install-exechas-integration-testshas-property-testshas-unit-testsimpl-algorithmimpl-concurrencyimpl-cryptoimpl-datastructureimpl-interpreterimpl-jitimpl-parserimpl-protocolis-benignnetwork-safenetwork-secureunsafe-documentedunsafe-minimalunsafe-safeunsafe-testeduses-concurrencyuses-cryptouses-environmentuses-execuses-filesystemuses-interpreteruses-jituses-networkuses-unsafe