RUSTSEC-2026-0386: `AsyncFd::new` and related constructors violate I/O safety
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 18.7k
- Fork
- 1.9k
- Merge trung bình
- 22 giờ 27 phút
- Pull request đã merge (30 ngày)
- 383
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bytecodealliance/wasmtime
-
bug wasm-proposal:exceptions wasmtime:debugging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bytecodealliance/wasmtime#14102 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wasm-proposal:gc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
bytecodealliance/wasmtime#13808 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add volatile flag to MemFlagsĐang mởcranelift cranelift:area:clif cranelift:goal:optimize-speed enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bytecodealliance/wasmtime#1598 · 9 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Read-only access to numeric globals from epoch/call hooks (`StoreHookState`)Có thể đã có người làm @smarcd đã nhận 1 ngày trước. Đang mởenhancement wasmtime:api
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
bytecodealliance/wasmtime#14965 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
bytecodealliance/wasmtime#14960 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của bytecodealliance/wasmtime
Issue tương tự
-
Small glitchĐang mởpriority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
storytold/photocraft#9538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2 rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jscott3201/rusty-bacnet#2085 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:tag area:tag---json---markdown--n bug factory:dogfood factory:triaged persona:scripter platform:linux-cloud priority:p3 type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
gitbutlerapp/grit#1940 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Inconsistent case in names for Windows installation packages compared to all other assetsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea:ui bug in progress needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
bherbruck/solvecraft#6769 · 2 bình luận ·