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
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 62/100
Hướng nghiên cứu
Trước tiên, hãy tìm nơi ev-node khai báo hoặc cập nhật phần phụ thuộc Tokio, rồi kiểm tra xem các hàm khởi tạo AsyncFd bị ảnh hưởng có được dùng trong kho lưu trữ này hay không. Báo cáo không nêu tệp mã nguồn hoặc bài kiểm thử nào; hãy lần theo mọi kết quả đến các hàm gọi chúng, đồng thời xác minh phiên bản và cách sử dụng phần phụ thuộc. Công việc hoàn tất khi kho lưu trữ không còn phụ thuộc vào các hàm khởi tạo an toàn bị ảnh hưởng và các bước kiểm tra liên quan đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
| Details | |
|---|---|
| Package | tokio |
| Version | 1.52.3 |
| Warning | unsound |
| URL | https://github.com/tokio-rs/tokio/pull/8587 |
| Patched Versions | >=1.51.6, <1.52.0 OR >=1.53.3 |
| Unaffected Versions | <0.3.2 |
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.
- Ngôn ngữ chính
- Go
- Star
- 362
- Fork
- 295
- Merge trung bình
- 9 giờ 29 phút
- Pull request đã merge (30 ngày)
- 3
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 evstack/ev-node
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
DA subscriber: inline rollback does not wake catch-upCó thể đã có người làm @damiannolan đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
DA follower: split-namespace height counted as done before its other namespace is processedCó thể đã có người làm @damiannolan đã nhận hôm nay. Đang mởneeds-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của evstack/ev-node
Issue tương tự
-
agent:ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
turbot/flowpipe#1162 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
LifetimeRemaining divides by zero when expireAfter is 0s, producing NaN disruption costsCó thể đã có người làm @weirong-ui đã nhận hôm nay. Đang mởkind/bug needs-priority needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kubernetes-sigs/karpenter#3728 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compaction: redundant exclusion checks after inRangeCó thể đã có người làm @moodbased đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
docker/mcp-registry#8199 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày