chore(deps): update rust crate tokio to v1.53.3 [security] #2416

Open
renovate wants to merge 1 commit from renovate/crate-tokio-vulnerability into main
Collaborator

This PR contains the following updates:

Package Type Update Change
tokio (source) workspace.dependencies patch 1.53.1 → 1.53.3

RUSTSEC-2026-0386

More information

Details

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:

  1. AsyncFd<T> implements AsFd for all T: AsRawFd by calling BorrowedFd::borrow_raw(self.as_raw_fd()), allowing safe code to obtain an arbitrary BorrowedFd<'_> without owning the file descriptor.
  2. Tokio's I/O driver stores a pointer to an internal allocation in the epoll/kqueue user data for registered file descriptors. If the underlying file descriptor is duplicated and then closed while an AsyncFd is alive, and the OS reuses that file descriptor number for a another IO resource on the same runtime, dropping the first AsyncFd deregisters the reused file descriptor number and frees the first while the original file description remains registered in epoll, 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.

Severity

Unknown

References

This data is provided by OSV and the Rust Advisory Database (CC0 1.0).


Release Notes

tokio-rs/tokio (tokio)

v1.53.3: Tokio v1.53.3

Compare Source

1.53.3 (October 13th, 2026)

Added
  • io: add AsyncFd::register and AsyncFd::register_with_interest (#​8587)
Changed
  • io: deprecate AsyncFd::{new, with_interest, try_new, try_with_interest} (#​8587)
Fixed
  • io: wake and drop DuplexStream wakers outside the lock (#​8618)
  • macros: avoid unreachable_code in join! and try_join! for Infallible (#​8518)
  • runtime: fix paused time auto-advancing when I/O wakes a task on current_thread (#​8595)
  • sync: wake waiters outside the lock when closing a semaphore (#​8529)
  • test: fix several flaky tests (#​8196, #​8427, #​8609)
Fixed (unstable)
  • rt: keep io_uring op alive when submission fails after push (#​8185)

v1.53.2: Tokio v1.53.2

Compare Source

1.53.2 (October 3rd, 2026)

Fixed
  • fs: handle integer overflow in buffered relative seek (#​8574)
  • io: revert "always cleanup AsyncFd registration list on deregister" (#​8540)
  • process: unregister Windows wait before closing child handle (#​8564)
  • rt: drop blocking pool mutex before shutting down rejected task (#​8562)
  • sync: fix mpsc index wraparound in block reclamation (#​8546)
  • sync: forget mpsc Permit before sending value (#​8560)
  • sync: validate MAX_PERMITS in Semaphore::acquire (#​8548)
  • sync: wake broadcast Sender::closed outside mutex (#​8558)
  • task: drop replaced waker outside lock in JoinSet (#​8554)
  • time: drop timer lock before dropping waker in clear_entry (#​8552)
  • time: expire timers directly on shutdown without rotating wheel (#​8570)
Fixed (unstable)
  • fs: clamp io_uring read length to u32::MAX (#​8572)
  • rt: ignore current_thread task dumps from other runtimes (#​8544)
  • rt: preserve io_uring context if a completion waker panics (#​8566)
  • sync: fix semaphore use-after-free and permit leak on tracing panic (#​8542)
  • taskdump: restore deferred leaf wakes during capture (#​8445)
  • time: drop stored waker when cancelling alt timer entry (#​8550)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | workspace.dependencies | patch | `1.53.1` → `1.53.3` | --- ### `AsyncFd::new` and related constructors violate I/O safety [RUSTSEC-2026-0386](https://rustsec.org/advisories/RUSTSEC-2026-0386.html) <details> <summary>More information</summary> #### Details `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: 1. `AsyncFd<T>` implements `AsFd` for all `T: AsRawFd` by calling `BorrowedFd::borrow_raw(self.as_raw_fd())`, allowing safe code to obtain an arbitrary `BorrowedFd<'_>` without owning the file descriptor. 2. Tokio's I/O driver stores a pointer to an internal allocation in the `epoll`/`kqueue` user data for registered file descriptors. If the underlying file descriptor is duplicated and then closed while an `AsyncFd` is alive, and the OS reuses that file descriptor number for a another IO resource on the same runtime, dropping the first `AsyncFd` deregisters the reused file descriptor number and frees the first while the original file description remains registered in `epoll`, 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`. #### Severity Unknown #### References - [https://crates.io/crates/tokio](https://crates.io/crates/tokio) - [https://rustsec.org/advisories/RUSTSEC-2026-0386.html](https://rustsec.org/advisories/RUSTSEC-2026-0386.html) - [https://github.com/tokio-rs/tokio/pull/8587](https://github.com/tokio-rs/tokio/pull/8587) - [https://github.com/tokio-rs/tokio/issues/8538](https://github.com/tokio-rs/tokio/issues/8538) - [https://github.com/tokio-rs/tokio/issues/8539](https://github.com/tokio-rs/tokio/issues/8539) This data is provided by [OSV](https://osv.dev/vulnerability/RUSTSEC-2026-0386) and the [Rust Advisory Database](https://github.com/RustSec/advisory-db) ([CC0 1.0](https://github.com/rustsec/advisory-db/blob/main/LICENSE.txt)). </details> --- ### Release Notes <details> <summary>tokio-rs/tokio (tokio)</summary> ### [`v1.53.3`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.53.3): Tokio v1.53.3 [Compare Source](https://github.com/tokio-rs/tokio/compare/tokio-1.53.2...tokio-1.53.3) ### 1.53.3 (October 13th, 2026) ##### Added - io: add `AsyncFd::register` and `AsyncFd::register_with_interest` ([#&#8203;8587]) ##### Changed - io: deprecate `AsyncFd::{new, with_interest, try_new, try_with_interest}` ([#&#8203;8587]) ##### Fixed - io: wake and drop `DuplexStream` wakers outside the lock ([#&#8203;8618]) - macros: avoid `unreachable_code` in `join!` and `try_join!` for `Infallible` ([#&#8203;8518]) - runtime: fix paused time auto-advancing when I/O wakes a task on `current_thread` ([#&#8203;8595]) - sync: wake waiters outside the lock when closing a semaphore ([#&#8203;8529]) - test: fix several flaky tests ([#&#8203;8196], [#&#8203;8427], [#&#8203;8609]) ##### Fixed (unstable) - rt: keep `io_uring` op alive when submission fails after push ([#&#8203;8185]) [#&#8203;8185]: https://github.com/tokio-rs/tokio/pull/8185 [#&#8203;8196]: https://github.com/tokio-rs/tokio/pull/8196 [#&#8203;8427]: https://github.com/tokio-rs/tokio/pull/8427 [#&#8203;8518]: https://github.com/tokio-rs/tokio/pull/8518 [#&#8203;8529]: https://github.com/tokio-rs/tokio/pull/8529 [#&#8203;8587]: https://github.com/tokio-rs/tokio/pull/8587 [#&#8203;8595]: https://github.com/tokio-rs/tokio/pull/8595 [#&#8203;8609]: https://github.com/tokio-rs/tokio/pull/8609 [#&#8203;8618]: https://github.com/tokio-rs/tokio/pull/8618 ### [`v1.53.2`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.53.2): Tokio v1.53.2 [Compare Source](https://github.com/tokio-rs/tokio/compare/tokio-1.53.1...tokio-1.53.2) ### 1.53.2 (October 3rd, 2026) ##### Fixed - fs: handle integer overflow in buffered relative seek ([#&#8203;8574]) - io: revert "always cleanup `AsyncFd` registration list on deregister" ([#&#8203;8540]) - process: unregister Windows wait before closing child handle ([#&#8203;8564]) - rt: drop blocking pool mutex before shutting down rejected task ([#&#8203;8562]) - sync: fix mpsc index wraparound in block reclamation ([#&#8203;8546]) - sync: forget mpsc `Permit` before sending value ([#&#8203;8560]) - sync: validate `MAX_PERMITS` in `Semaphore::acquire` ([#&#8203;8548]) - sync: wake broadcast `Sender::closed` outside mutex ([#&#8203;8558]) - task: drop replaced waker outside lock in `JoinSet` ([#&#8203;8554]) - time: drop timer lock before dropping waker in `clear_entry` ([#&#8203;8552]) - time: expire timers directly on shutdown without rotating wheel ([#&#8203;8570]) ##### Fixed (unstable) - fs: clamp `io_uring` read length to `u32::MAX` ([#&#8203;8572]) - rt: ignore `current_thread` task dumps from other runtimes ([#&#8203;8544]) - rt: preserve `io_uring` context if a completion waker panics ([#&#8203;8566]) - sync: fix semaphore use-after-free and permit leak on tracing panic ([#&#8203;8542]) - taskdump: restore deferred leaf wakes during capture ([#&#8203;8445]) - time: drop stored waker when cancelling alt timer entry ([#&#8203;8550]) [#&#8203;8445]: https://github.com/tokio-rs/tokio/pull/8445 [#&#8203;8572]: https://github.com/tokio-rs/tokio/pull/8572 [#&#8203;8540]: https://github.com/tokio-rs/tokio/pull/8540 [#&#8203;8542]: https://github.com/tokio-rs/tokio/pull/8542 [#&#8203;8544]: https://github.com/tokio-rs/tokio/pull/8544 [#&#8203;8546]: https://github.com/tokio-rs/tokio/pull/8546 [#&#8203;8548]: https://github.com/tokio-rs/tokio/pull/8548 [#&#8203;8550]: https://github.com/tokio-rs/tokio/pull/8550 [#&#8203;8552]: https://github.com/tokio-rs/tokio/pull/8552 [#&#8203;8554]: https://github.com/tokio-rs/tokio/pull/8554 [#&#8203;8558]: https://github.com/tokio-rs/tokio/pull/8558 [#&#8203;8560]: https://github.com/tokio-rs/tokio/pull/8560 [#&#8203;8562]: https://github.com/tokio-rs/tokio/pull/8562 [#&#8203;8564]: https://github.com/tokio-rs/tokio/pull/8564 [#&#8203;8566]: https://github.com/tokio-rs/tokio/pull/8566 [#&#8203;8570]: https://github.com/tokio-rs/tokio/pull/8570 [#&#8203;8574]: https://github.com/tokio-rs/tokio/pull/8574 </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODEuMTAiLCJ1cGRhdGVkSW5WZXIiOiI0NC4xODEuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIkRlcGVuZGVuY2llcyIsIkRlcGVuZGVuY2llcy9SZW5vdmF0ZSJdfQ==-->
chore(deps): update rust crate tokio to v1.53.3 [security]
All checks were successful
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m13s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 6s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m21s
Documentation / Build and Deploy Documentation (pull_request) Successful in 10m33s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 10m50s
2124c6702d
All checks were successful
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Required
Details
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m13s
Required
Details
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 6s
Required
Details
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m21s
Documentation / Build and Deploy Documentation (pull_request) Successful in 10m33s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 10m50s
Required
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'renovate/crate-tokio-vulnerability:renovate/crate-tokio-vulnerability'
git switch 'renovate/crate-tokio-vulnerability'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity!2416
No description provided.