RUSTSEC-2021-0072

Source
https://rustsec.org/advisories/RUSTSEC-2021-0072
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2021-0072.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2021-0072
Aliases
Published
2021-07-07T12:00:00Z
Modified
2023-11-08T04:06:25.982475Z
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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / tokio

Package

Affected ranges

Type
SEMVER
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

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "tokio::task::JoinHandle::abort"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": null,
    "categories": [
        "memory-corruption"
    ]
}