{"id":"GHSA-4q83-7cq4-p6wg","aliases":["RUSTSEC-2023-0005"],"status":"published","title":"`tokio::io::ReadHalf\u003cT\u003e::unsplit` is Unsound","description":"`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.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2023-01-11T12:00:00Z","modified":"2026-09-10T03:49:56Z","fixes":[{"ecosystem":"crates.io","package":"tokio","fixed_in":["1.24.2","1.20.4","1.18.5"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.21.0"},{"fixed":"1.24.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.19.0"},{"fixed":"1.20.4"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.0"},{"fixed":"1.18.5"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"1.21.0"},{"fixed":"1.24.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"1.19.0"},{"fixed":"1.20.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.0"},{"fixed":"1.18.5"}]}]},{"source":"osv","ecosystem":"crates.io","package":"tokio","ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.0"},{"fixed":"1.18.5"},{"introduced":"1.19.0"},{"fixed":"1.20.4"},{"introduced":"1.21.0"},{"fixed":"1.24.2"}]}]}],"references":[{"url":"https://github.com/tokio-rs/tokio/issues/5372","tags":["web","report"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0005.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-4q83-7cq4-p6wg"},{"url":"https://github.com/tokio-rs/tokio","tags":["package"]},{"url":"https://crates.io/crates/tokio","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-4q83-7cq4-p6wg","title":"`tokio::io::ReadHalf\u003cT\u003e::unsplit` is Unsound","description":"`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","status":"published","published":"2023-02-04T00:30:37Z","modified":"2023-02-04T00:30:37Z","updated_at":"2026-11-02T14:36:44.093794Z"}],"osv":[{"id":"GHSA-4q83-7cq4-p6wg","title":"`tokio::io::ReadHalf\u003cT\u003e::unsplit` is Unsound","description":"`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","status":"published","published":"2023-02-04T00:30:37Z","modified":"2026-09-10T03:49:56.588581223Z","updated_at":"2026-11-02T15:46:37.148947Z"},{"id":"RUSTSEC-2023-0005","title":"`tokio::io::ReadHalf\u003cT\u003e::unsplit` is Unsound","description":"`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.","status":"published","published":"2023-01-11T12:00:00Z","modified":"2023-11-08T04:15:17.465753Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
