RUSTSEC-2026-0386: `AsyncFd::new` and related constructors violate I/O safety
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 15/100
Direzione di ricerca
The issue describes an unsoundness report in Tokio's AsyncFd constructors, but does not identify any Wasmtime files or tests to change. Start by reading the linked Tokio pull request and advisory, then check whether Wasmtime uses the affected constructors. Done looks like a scoped response to the report based on that investigation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
AsyncFd::newand related constructors violate I/O safety
| Details | |
|---|---|
| Status | unsound |
| Package | tokio |
| Version | 1.51.1 |
| URL | https://github.com/tokio-rs/tokio/pull/8587 |
| Date | 2026-10-13 |
tokio::io::unix::AsyncFd provides safe constructors (new, with_interest, try_new, and try_with_interest) that accept any T: AsRawFd rather than requiring proof of ownership or validity of the file descriptor. Because RawFd implements AsRawFd, safe code can construct an AsyncFd from an arbitrary or closed file descriptor, or close/replace the underlying file descriptor while the AsyncFd is still alive.
This violates I/O safety in two ways:
AsyncFd<T>implementsAsFdfor allT: AsRawFdby callingBorrowedFd::borrow_raw(self.as_raw_fd()), allowing safe code to obtain an arbitraryBorrowedFd<'_>without owning the file descriptor.- Tokio's I/O driver stores a pointer to an internal allocation in the
epoll/kqueueuser data for registered file descriptors. If the underlying file descriptor is duplicated and then closed while anAsyncFdis alive, and the OS reuses that file descriptor number for a another IO resource on the same runtime, dropping the firstAsyncFdderegisters the reused file descriptor number and frees the first while the original file description remains registered inepoll, leading to a use-after-free when a readiness event fires.
Starting in Tokio 1.51.6, 1.53.3, and 1.54.0, AsyncFd::new, AsyncFd::with_interest, AsyncFd::try_new, and AsyncFd::try_with_interest are deprecated in favor of the unsafe constructors AsyncFd::register and AsyncFd::register_with_interest. Callers must ensure that the file descriptor remains valid, open, and unchanged for the lifetime of the AsyncFd.
See advisory page for additional details.
- Lingua principale
- Rust
- Stelle
- 18.7k
- Fork
- 1.9k
- Merge medio
- 23h
- PR unite (30g)
- 361
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bytecodealliance/wasmtime
-
bug wasm-proposal:exceptions wasmtime:debugging
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bytecodealliance/wasmtime#14102 ·
I maintainer di solito rispondono entro 1 giorno
-
wasm-proposal:gc
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bytecodealliance/wasmtime#13808 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
cranelift cranelift:area:clif cranelift:goal:optimize-speed enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bytecodealliance/wasmtime#1598 · 9 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
bytecodealliance/wasmtime#14989 ·
I maintainer di solito rispondono entro 1 giorno
-
Read-only access to numeric globals from epoch/call hooks (`StoreHookState`)Forse già presa @smarcd l’ha presa 2 giorni fa. Apertaenhancement wasmtime:api
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
bytecodealliance/wasmtime#14965 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di bytecodealliance/wasmtime
Issue simili
-
accounts bug decoding
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
wboayue/rust-ibapi#1088 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
`mise doctor` Shows Not Installed Lazy Tools as ProblemsForse già presa @jdx l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
area:kernel needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bherbruck/solvecraft#7179 · 1 commento ·
-
priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
storytold/photocraft#9704 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno