PT-2021-24284 · Tokio+2 · Tokio+2
Published
2021-11-16
·
Updated
2024-09-09
·
CVE-2021-45710
CVSS v3.1
8.1
High
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions:
tokio crate versions 1.8.4 and earlier
tokio crate versions 1.9.x through 1.13.x before 1.13.1
Description:
An issue in the tokio crate for Rust can cause a data race and memory corruption in certain circumstances involving a closed oneshot channel. If a
tokio::sync::oneshot channel is closed via the oneshot::Receiver::close method, a data race may occur if the oneshot::Sender::send method is called while the corresponding oneshot::Receiver is awaited or calling try recv. This can result in memory corruption when both halves of the channel are used after the Receiver half has called close.Recommendations:
For tokio crate versions 1.8.4 and earlier, update to version 1.8.4 or later.
For tokio crate versions 1.9.x through 1.13.x before 1.13.1, update to version 1.13.1 or later.
As a temporary workaround, consider avoiding the use of the
close method on the oneshot::Receiver half of the channel, or ensure that the oneshot::Sender::send method is not called while the corresponding oneshot::Receiver is awaited or calling try recv.Fix
Race Condition
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Debian
Suse
Tokio