{"id":"GHSA-4q83-7cq4-p6wg","aliases":["GHSA-4q83-7cq4-p6wg","RUSTSEC-2023-0005"],"related":[],"kind":"vulnerability","state":"published","title":"`tokio::io::ReadHalf<T>::unsplit` is Unsound","summary":"`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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"`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.","format":"markdown","source":"ghsa"}],"published":"2023-01-11T12:00:00.000Z","modified":"2026-09-10T03:49:56.588Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"LOW"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"LOW"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"1.21.0","status":"affected","fixed":"1.24.2"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.19.0","status":"affected","fixed":"1.20.4"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.2.0","status":"affected","fixed":"1.18.5"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.2.0","status":"affected","fixed":"1.18.5"},{"type":"semver","introduced":"1.19.0","status":"affected","fixed":"1.20.4"},{"type":"semver","introduced":"1.21.0","status":"affected","fixed":"1.24.2"}],"ecosystem":"crates.io","package":"tokio","purl":"pkg:cargo/tokio","source":"rustsec"}],"references":[{"url":"https://github.com/tokio-rs/tokio/issues/5372","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/tokio-rs/tokio","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0005.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/tokio","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4q83-7cq4-p6wg","url":"https://github.com/advisories/GHSA-4q83-7cq4-p6wg","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:56.588Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2023-0005","url":"https://rustsec.org/advisories/RUSTSEC-2023-0005.html","licence":"CC0-1.0","modified":"2023-11-08T04:15:17.465Z"}],"updatedAt":"2026-11-25T22:56:43.136Z"}