Description
Tokio is a runtime for writing applications with Rust. In 1.54.0, a race condition between tokio::time::Interval::poll_tick (including .tick().await) and the multi-threaded runtime's time driver could drop an internal timer entry without synchronizing with the driver thread that was firing it. The race caused a use-after-free on the timer's waker and task state in safe Rust, which could produce assertion panics, task reference-count corruption, or heap memory corruption. This issue is fixed in 1.54.1.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| tokio-rs | tokio | = 1.54.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | topgrade | 17.14.1-r2 | — |
| Wolfi rolling | wasmtime +1 | 50.0.0-r1 | — |
| Wolfi rolling | xh | 0.26.3-r1 | — |
| Wolfi rolling | yazi | 26.9.1-r6 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| crates.io | tokio | >= 1.54.0, < 1.54.1 | 1.54.1 | GHSA-5wjr-9356-4wc8 |
References
- https://github.com/tokio-rs/tokio/security/advisories/GHSA-5wjr-9356-4wc8
- https://github.com/tokio-rs/tokio/pull/8458
- https://github.com/tokio-rs/tokio/pull/8692
- https://github.com/tokio-rs/tokio/commit/2b4eba7833864c04ecd2f3e5f4a97ff4f6fa28d0
- https://github.com/tokio-rs/tokio/commit/5ed619bbaba87357ee5103d71b75e7c84cad99c9
- https://github.com/tokio-rs/tokio/releases/tag/tokio-1.54.1