Skip to content

Update Rust crate tokio from 1.53.1 to 1.53.3 [SECURITY] - #135

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/crate-tokio-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/crate-tokio-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

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

AsyncFd::new and related constructors violate I/O safety

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 was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants