GHSA-2grh-hm3w-w7hvMediumCVSS 5.9

Race condition in tokio

Published
August 25, 2021
Last Modified
June 22, 2023

🔗 CVE IDs covered (1)

📋 Description

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 products4

  • rust/tokio:>= 1.8.0, < 1.8.1
  • rust/tokio:>= 1.7.0, < 1.7.2
  • rust/tokio:>= 1.6.0, < 1.6.3
  • rust/tokio:>= 0.3.0, < 1.5.1

🔗 References (5)