GitHub Advisory Database
GHSA-2grh-hm3w-w7hv
Race condition in tokio
Details
When aborting a task with JoinHandle::abort, the future is dropped in the thread calling abort if the task is not currently being executed. This is incorrect for tasks spawned on a LocalSet. This can easily result in race conditions as many projects use Rc or RefCell in their Tokio tasks for better performance.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| crates.io | tokio | From 1.8.0 before 1.8.1 (fixed in 1.8.1) |
| crates.io | tokio | From 1.7.0 before 1.7.2 (fixed in 1.7.2) |
| crates.io | tokio | From 1.6.0 before 1.6.3 (fixed in 1.6.3) |
| crates.io | tokio | From 0.3.0 before 1.5.1 (fixed in 1.5.1) |