# GHSA-4q83-7cq4-p6wg: `tokio::io::ReadHalf<T>::unsplit` is Unsound

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-01-11T12:00:00.000Z
- Modified: 2026-09-10T03:49:56.588Z
- Also known as: RUSTSEC-2023-0005

## Description

`tokio::io::ReadHalf<T>::unsplit` can violate the `Pin` contract

The soundness issue is described in the [tokio/issues#5372](https://github.com/tokio-rs/tokio/issues/5372)

Specific set of conditions needed to trigger an issue (a !Unpin type in ReadHalf)
is unusual, combined with the difficulty of making any arbitrary use-after-free
exploitable in Rust without doing a lot of careful alignment of data types in
the surrounding code.

The `tokio` feature `io-util` is also required to be enabled to trigger this
soundness issue.

Thanks to zachs18 reporting the issue to Tokio team responsibly and taiki-e
and carllerche appropriately responding and fixing the soundness bug.

Tokio before 0.2.0 used `futures` 0.1 that did not have `Pin`, so it is not
affected by this issue.

(As written by GitHub Advisory Database.)

## Affected

- tokio (crates.io): from 1.21.0 before 1.24.2; from 1.19.0 before 1.20.4; from 0.2.0 before 1.18.5

## References

- <https://github.com/tokio-rs/tokio/issues/5372> (report, web)
- <https://github.com/tokio-rs/tokio> (package)
- <https://rustsec.org/advisories/RUSTSEC-2023-0005.html> (advisory, web)
- <https://crates.io/crates/tokio> (package)

## Sources

- GitHub Advisory Database: [GHSA-4q83-7cq4-p6wg](https://github.com/advisories/GHSA-4q83-7cq4-p6wg), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2023-0005](https://rustsec.org/advisories/RUSTSEC-2023-0005.html), CC0-1.0, modified 2023-11-08

---

Page: https://cve.day/GHSA-4q83-7cq4-p6wg · Whole record: https://cve.day/GHSA-4q83-7cq4-p6wg.json · Rebuilt by cve.day 2026-11-25T22:56:43.136Z
