rustsec-2021-0072
Vulnerability from osv_rustsec
Published
2021-07-07 12:00
Modified
2023-06-13 13:10
Summary
Task dropped in wrong thread when aborting `LocalSet` task
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.
See tokio#3929 for more details.
{
"affected": [
{
"database_specific": {
"categories": [
"memory-corruption"
],
"cvss": null,
"informational": null
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [
"tokio::task::JoinHandle::abort"
],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "tokio",
"purl": "pkg:cargo/tokio"
},
"ranges": [
{
"events": [
{
"introduced": "0.3.0"
},
{
"fixed": "1.5.1"
},
{
"introduced": "1.6.0"
},
{
"fixed": "1.6.3"
},
{
"introduced": "1.7.0"
},
{
"fixed": "1.7.2"
},
{
"introduced": "1.8.0"
},
{
"fixed": "1.8.1"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"CVE-2021-38191",
"GHSA-2grh-hm3w-w7hv"
],
"database_specific": {
"license": "CC0-1.0"
},
"details": "When aborting a task with `JoinHandle::abort`, the future is dropped in the\nthread calling abort if the task is not currently being executed. This is\nincorrect for tasks spawned on a `LocalSet`.\n\nThis can easily result in race conditions as many projects use `Rc` or `RefCell`\nin their Tokio tasks for better performance.\n\nSee [tokio#3929][issue] for more details.\n\n[issue]: https://github.com/tokio-rs/tokio/issues/3929",
"id": "RUSTSEC-2021-0072",
"modified": "2023-06-13T13:10:24Z",
"published": "2021-07-07T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/tokio"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2021-0072.html"
},
{
"type": "REPORT",
"url": "https://github.com/tokio-rs/tokio/issues/3929"
}
],
"related": [],
"severity": [],
"summary": "Task dropped in wrong thread when aborting `LocalSet` task"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…