Amazon Linux 2 : rust (ALAS-2022-1816)

critical Nessus Plugin ID 163234

Synopsis

The remote Amazon Linux 2 host is missing a security update.

Description

The version of rust installed on the remote host is prior to 1.56.1-1. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2022-1816 advisory.

- 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. This bug could lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait. (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 that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Run 'yum update rust' to update your system.

See Also

https://alas.aws.amazon.com/AL2/ALAS-2022-1816.html

https://alas.aws.amazon.com/cve/html/CVE-2020-36323.html

https://alas.aws.amazon.com/cve/html/CVE-2021-28876.html

https://alas.aws.amazon.com/cve/html/CVE-2021-28878.html

https://alas.aws.amazon.com/cve/html/CVE-2021-28879.html

https://alas.aws.amazon.com/cve/html/CVE-2021-31162.html

Plugin Details

Severity: Critical

ID: 163234

File Name: al2_ALAS-2022-1816.nasl

Version: 1.3

Type: local

Agent: unix

Published: 7/15/2022

Updated: 10/17/2023

Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.9

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2021-31162

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:cargo, p-cpe:/a:amazon:linux:cargo-doc, p-cpe:/a:amazon:linux:clippy, p-cpe:/a:amazon:linux:rls, p-cpe:/a:amazon:linux:rust, p-cpe:/a:amazon:linux:rust-analysis, p-cpe:/a:amazon:linux:rust-debugger-common, p-cpe:/a:amazon:linux:rust-debuginfo, p-cpe:/a:amazon:linux:rust-doc, p-cpe:/a:amazon:linux:rust-gdb, p-cpe:/a:amazon:linux:rust-src, p-cpe:/a:amazon:linux:rust-std-static, p-cpe:/a:amazon:linux:rustfmt, cpe:/o:amazon:linux:2

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 7/6/2022

Vulnerability Publication Date: 4/11/2021

Reference Information

CVE: CVE-2020-36323, CVE-2021-28876, CVE-2021-28878, CVE-2021-28879, CVE-2021-31162