Vulnerability RUSTSEC-2023-0005

Unknown
UNKNOWN RISK
Vulnerabilities without an assigned CVSS score. Severity is not determinable from available data.
3 years ago
January 11, 2023 at 12:00 PM UTC
`tokio::io::ReadHalf<T>::unsplit` is Unsound
0.2.0 - 1.18.4
0.2.0 - 1.18.4

Summary

`tokio::io::ReadHalf<T>::unsplit` is Unsound

Details

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

The soundness issue is described in the 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.

Impacted packages

Timeline

Published
3 years ago
January 11, 2023 at 12:00 PM UTC
Fixed (1.18.5)
3 years ago
January 17, 2023 at 06:28 PM UTC
Fixed (1.20.4)
3 years ago
January 17, 2023 at 07:44 PM UTC
Fixed (1.24.2)
3 years ago
January 17, 2023 at 08:57 PM UTC
Last Modified
2 years ago
November 08, 2023 at 04:15 AM UTC