GHSA-4q83-7cq4-p6wg: `tokio :io::ReadHalf<T>::unsplit` Is Unsound Vulnerability
LOWGHSA-4q83-7cq4-p6wg is a LOW :io::readhalf<t>::unsplit` is unsound vulnerability (General Security Weakness) affecting `tokio libraries in the crates.io ecosystem. The issue involves :io::readhalf<t>::unsplit` is unsound. Remediation is available by upgrading affected packages to version 1.24.2, 1.20.4, 1.18.5.
GHSA-4q83-7cq4-p6wg at a Glance
How to Fix GHSA-4q83-7cq4-p6wg
To remediate this vulnerability, upgrade all affected `tokio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade tokio to 1.24.2
Upgrade tokio to 1.20.4
Upgrade tokio to 1.18.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for tokio
How to Check if You Are Affected
To determine whether your application is affected by GHSA-4q83-7cq4-p6wg, inspect your project dependencies for `tokio:
inspect dependencies for tokio
Analyze the terminal output to locate any version of `tokio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.24.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In `tokio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-4q83-7cq4-p6wg Affected `tokio Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tokio
|
crates.io |
≥ 1.21.0
< 1.24.2
|
1.24.2
|
|
tokio
|
crates.io |
≥ 1.19.0
< 1.20.4
|
1.20.4
|
|
tokio
|
crates.io |
≥ 0.2.0
< 1.18.5
|
1.18.5
|
References
Frequently Asked Questions
What is GHSA-4q83-7cq4-p6wg?
Which `tokio versions are affected?
What version fixes GHSA-4q83-7cq4-p6wg?
Is tokio affected?
What CWE is associated with GHSA-4q83-7cq4-p6wg?
How can I check crates.io dependencies for GHSA-4q83-7cq4-p6wg?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4q83-7cq4-p6wg",
"modified" : "2023-02-04T00:30:37Z",
"published" : "2023-02-04T00:30:37Z",
"aliases" : [ ],
"summary" : "`tokio::io::ReadHalf<T>::unsplit` is Unsound",
"details" : "`tokio::io::ReadHalf<T>::unsplit` can violate the `Pin` contract\n\nThe soundness issue is described in the [tokio/issues#5372](https://github.com/tokio-rs/tokio/issues/5372)\n\nSpecific set of conditions needed to trigger an issue (a !Unpin type in ReadHalf)\nis unusual, combined with the difficulty of making any arbitrary use-after-free\nexploitable in Rust without doing a lot of careful alignment of data types in\nthe surrounding code.\n\nThe `tokio` feature `io-util` is also required to be enabled to trigger this\nsoundness issue.\n\nThanks to zachs18 reporting the issue to Tokio team responsibly and taiki-e\nand carllerche appropriately responding and fixing the soundness bug.\n\nTokio before 0.2.0 used `futures` 0.1 that did not have `Pin`, so it is not\naffected by this issue.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "tokio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.21.0"
}, {
"fixed" : "1.24.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "tokio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.19.0"
}, {
"fixed" : "1.20.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "tokio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.2.0"
}, {
"fixed" : "1.18.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tokio-rs/tokio/issues/5372"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tokio-rs/tokio"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0005.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-04T00:30:37Z",
"nvd_published_at" : null
}
}