CVE-2021-31162
Alibaba Cloud Linux (Aliyun Linux) vulnerability analysis and mitigation

Overview

CVE-2021-31162 is a vulnerability discovered in the Rust programming language's standard library affecting versions before 1.52.0. The vulnerability was disclosed on April 14, 2021, and involves a double free condition that can occur in the Vec::from_iter function specifically when freeing an element panics (CVE-MITRE, NVD).

Technical details

The vulnerability is classified as a double free vulnerability (CWE-415) in the Vec::from_iter implementation. The issue occurs specifically in the specialization for Vec when freeing an element triggers a panic, leading to a potential double free of the same memory location. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) (NVD).

Impact

The vulnerability can result in a double free condition, which could lead to memory corruption and potential program crashes. Because Rust is statically linked, affected applications need to be rebuilt to benefit from the fixes. The actual security implications depend on how these APIs are used in each particular case (Fedora-Advisory).

Mitigation and workarounds

The vulnerability was fixed in Rust version 1.52.0. Users are advised to upgrade to this version or later. For systems that cannot immediately upgrade, there is no known workaround. The fix was backported to various Linux distributions including Fedora 32, 33, and 34 through security updates (Fedora-Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management