Race condition in tokio
Moderate severity
GitHub Reviewed
Published
Aug 25, 2021
to the GitHub Advisory Database
•
Updated Jun 22, 2023
Package
Affected versions
>= 1.8.0, < 1.8.1
>= 1.7.0, < 1.7.2
>= 1.6.0, < 1.6.3
>= 0.3.0, < 1.5.1
Patched versions
1.8.1
1.7.2
1.6.3
1.5.1
Description
Published by the National Vulnerability Database
Aug 8, 2021
Reviewed
Aug 18, 2021
Published to the GitHub Advisory Database
Aug 25, 2021
Last updated
Jun 22, 2023
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.
References