{"id":"RUSTSEC-2023-0005","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.","aliases":["GHSA-4q83-7cq4-p6wg"],"modified":"2023-11-08T04:15:17.465753Z","published":"2023-01-11T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/tokio"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2023-0005.html"},{"type":"REPORT","url":"https://github.com/tokio-rs/tokio/issues/5372"}],"affected":[{"package":{"name":"tokio","ecosystem":"crates.io","purl":"pkg:cargo/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"}]}],"ecosystem_specific":{"affects":{"os":[],"arch":[],"functions":[]},"affected_functions":null},"database_specific":{"informational":"unsound","categories":["memory-exposure"],"cvss":null,"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2023-0005.json"}}],"schema_version":"1.7.3"}