CVE-2021-38191
JSON

5.9medium

Race condition in tokio

Severity
5.9medium CVSS:3.1 by NVD
Exploit likelihood
0.83% (higher than 55% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-2grh-hm3w-w7hvRUSTSEC-2021-0072

Description

An issue was discovered in the tokio crate before 1.8.1 for Rust. Upon a JoinHandle::abort, a Task may be dropped in the wrong thread.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
tokio (crates.io)from 1.8.0 before 1.8.1, from 1.7.0 before 1.7.2, from 1.6.0 before 1.6.3, from 0.3.0 before 1.5.1GitHub Advisory Database, RustSec Advisory Database
tokio tokiofrom 0.3.0 before 1.5.1, from 1.6.0 before 1.6.3, from 1.7.0 before 1.7.2, 1.8.0NVD

All scores

GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

An issue was discovered in the tokio crate before 1.8.1 for Rust. Upon a JoinHandle::abort, a Task may be dropped in the wrong thread.

GitHub Advisory Database

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.

RustSec Advisory Database

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 for more details.

NVD (es)

Se ha detectado un problema en la crate tokio versiones anteriores a 1.8.1 para Rust. Tras una función JoinHandle::abort, una Tarea puede ser lanzada en el hilo equivocado

References

Sources

SourceRecordLicence
CVE ListCVE-2021-38191 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-2grh-hm3w-w7hv changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0072 changed 2023-11-08CC0-1.0
NVDCVE-2021-38191 changed 2026-06-17Public domain