Update Rust crate tokio to v1.53.3 [SECURITY] #325

Merged
kompas-review merged 2 commits from renovate/crate-tokio-vulnerability into main 2026-11-01 11:44:37 +01:00
Collaborator

This PR contains the following updates:

Package Type Update Change
tokio (source) 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: (in timezone Europe/Amsterdam)

  • 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)) | 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**: (in timezone Europe/Amsterdam) - 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTguMyIsInVwZGF0ZWRJblZlciI6IjQ0LjE5OC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBzIiwic2VjdXJpdHkiXX0=-->
Update Rust crate tokio to v1.53.3 [SECURITY]
Some checks failed
kreative-pr/review nothing to review: no changed file left after the ignore rules
build / skills (pull_request) Successful in 16s
build / web (pull_request) Successful in 22s
build / server (pull_request) Successful in 1m24s
build / runner-windows (pull_request) Successful in 10s
fresh-install / fresh-install (pull_request) Successful in 2m36s
build / runner (pull_request) Successful in 4m2s
lint / megalinter (pull_request) Successful in 1m1s
build / web-live (pull_request) Failing after 6m7s
review-gate / sweep (pull_request) Has been cancelled
kk / all-checks Failed: build / web-live (pull_request)
review-gate / gate review findings are all handled
ecca274e7a

🧹 Lint report · ✅ all 25 checks clean

Errors below fail this check.

✅ Clean: black, checkstyle, djlint, editorconfig-checker, git_diff, gitleaks, grype, hadolint, htmlhint, isort, jsonlint, markdownlint, npm-groovy-lint, pmd, prettier, prettier, ruff, secretlint, shellcheck, shfmt, stylelint, trivy, trufflehog, xmllint, yamllint

MegaLinter on soucouyant · full logs in the Actions run · comment /improve for AI fix suggestions

<!-- kk-lint --> ## 🧹 Lint report · ✅ all 25 checks clean Errors below fail this check. ✅ Clean: black, checkstyle, djlint, editorconfig-checker, git_diff, gitleaks, grype, hadolint, htmlhint, isort, jsonlint, markdownlint, npm-groovy-lint, pmd, prettier, prettier, ruff, secretlint, shellcheck, shfmt, stylelint, trivy, trufflehog, xmllint, yamllint <sub>MegaLinter on soucouyant · full logs in the Actions run · comment <code>/improve</code> for AI fix suggestions</sub>
Merge main into renovate/crate-tokio-vulnerability (web-live fixes from #327)
All checks were successful
build / web (pull_request) Successful in 11s
build / skills (pull_request) Successful in 12s
build / server (pull_request) Successful in 18s
build / runner-windows (pull_request) Successful in 32s
build / runner (pull_request) Successful in 35s
review-gate / sweep (pull_request) Successful in 8s
lint / megalinter (pull_request) Successful in 55s
review-gate / gate review findings are all handled
kreative-pr/review nothing to review: no changed file left after the ignore rules
build / web-live (pull_request) Successful in 4m53s
fresh-install / fresh-install (pull_request) Successful in 7m39s
kk / all-checks All 10 checks passed
2f88c7564a
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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
khyretos/kreative-kompanion!325
No description provided.