CVE-2021-38191

MEDIUM5.9EPSS 0.34%

Task dropped in wrong thread when aborting `LocalSet` task

Published: 8/25/2021Modified: 11/8/2023
Also known as:GHSA-2grh-hm3w-w7hvRUSTSEC-2021-0072

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. See [tokio#3929][issue] for more details. [issue]: https://github.com/tokio-rs/tokio/issues/3929

Affected packages (2)

CVSS scores

SourceVersionSeverityVector
osvCVSS 3.1MEDIUM5.9CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

References (6)