QID 353979

Date Published: 2022-07-18

QID 353979: Amazon Linux Security Advisory for rust : ALAS2-2022-1816

In the standard library in rust before 1.52.0, there is an optimization for joining strings that can cause uninitialized bytes to be exposed (or the program to crash) if the borrowed string changes after its length is checked. (
( CVE-2020-36323) in the standard library in rust before 1.52.0, the zip implementation has a panic safety issue.
It calls __iterator_get_unchecked() more than once for the same index when the underlying iterator panics (in certain conditions).
This bug could lead to a memory safety violation due to an unmet safety requirement for the trustedrandomaccess trait. (
( CVE-2021-28876) in the standard library in rust before 1.52.0, the zip implementation calls __iterator_get_unchecked() more than once for the same index (under certain conditions) when next_back() and next() are used together.
( CVE-2021-28878) in the standard library in rust before 1.52.0, the zip implementation can report an incorrect size due to an integer overflow.
This bug can lead to a buffer overflow when a consumed zip iterator is used again. (
( CVE-2021-28879) in the standard library in rust before 1.52.0, a double free can occur in the vec::from_iter function if freeing the element panics. (
( CVE-2021-31162)



Note: The preceding description block is extracted directly from the security advisory. Using automation, we have attempted to clean and format it as much as possible without introducing additional issues.

Successful exploitation of this vulnerability could lead to a securitybreach or could affect integrity, availability, and confidentiality.

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as High - 7.5 severity.
  • Solution
    Please refer to Amazon advisory: ALAS2-2022-1816 for affected packages and patching details, or update with your package manager.
    Vendor References
    Software Advisories
    Advisory ID Software Component Link
    ALAS2-2022-1816 Amazon Linux 2 URL Logo alas.aws.amazon.com/AL2/ALAS-2022-1816.html