Rust · Rust · CVE-2021-28878
Name of the Vulnerable Software and Affected Versions:
Rust versions prior to 1.52.0
Description:
The issue arises in the standard library of Rust when the Zip implementation calls ` iterator get unchecked()` more than once for the same index under certain conditions, specifically when `next back()` and `next()` are used together. This can lead to a memory safety violation due to an unmet safety requirement for the `TrustedRandomAccess` trait.
Recommendations:
For Rust versions prior to 1.52.0, update to version 1.52.0 or later to resolve the issue. As a temporary workaround, consider avoiding the use of `next back()` and `next()` together in the Zip implementation until a patch is applied.