{"id":"GHSA-4q83-7cq4-p6wg","summary":"`tokio::io::ReadHalf\u003cT\u003e::unsplit` is Unsound","details":"`tokio::io::ReadHalf\u003cT\u003e::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","aliases":["RUSTSEC-2023-0005"],"modified":"2026-09-10T03:49:56.588581223Z","published":"2023-02-04T00:30:37Z","database_specific":{"cwe_ids":[],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2023-02-04T00:30:37Z","nvd_published_at":null},"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"}],"affected":[{"package":{"name":"tokio","ecosystem":"crates.io","purl":"pkg:cargo/tokio"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.21.0"},{"fixed":"1.24.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/02/GHSA-4q83-7cq4-p6wg/GHSA-4q83-7cq4-p6wg.json"}},{"package":{"name":"tokio","ecosystem":"crates.io","purl":"pkg:cargo/tokio"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.19.0"},{"fixed":"1.20.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/02/GHSA-4q83-7cq4-p6wg/GHSA-4q83-7cq4-p6wg.json"}},{"package":{"name":"tokio","ecosystem":"crates.io","purl":"pkg:cargo/tokio"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.0"},{"fixed":"1.18.5"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/02/GHSA-4q83-7cq4-p6wg/GHSA-4q83-7cq4-p6wg.json"}}],"schema_version":"1.9.0"}