Amazon Linux 2022 : grub2-common, grub2-efi-aa64, grub2-efi-aa64-cdboot (ALAS2022-2022-109)

high Nessus Plugin ID 164779

Synopsis

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

Description

It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2022-2022-109 advisory.

A flaw was found in grub 2, where a crafted 16-bit grayscale PNG image may lead to an out-of-bounds write.
This flaw allows an attacker to corrupt the data on the heap portion of the grub2's memory, leading to possible code execution and the circumvention of the secure boot mechanism. (CVE-2021-3695)

A flaw was found in grub2 when handling a PNG image header. When decoding the data contained in the Huffman table at the PNG file header, an out-of-bounds write may happen on grub's heap. (CVE-2021-3696)

A flaw was found in grub2 when handling JPEG images. This flaw allows an attacker to craft a malicious JPEG image, which leads to an underflow on a grub2's internal pointer, leading to a heap-based out-of- bounds write. Secure-boot mechanisms circumvention and arbitrary code execution may also be achievable.
(CVE-2021-3697)

A flaw was found in grub2 when handling IPv4 packets. This flaw allows an attacker to craft a malicious packet, triggering an integer underflow in grub code. Consequently, the memory allocation for handling the packet data may be smaller than the size needed. This issue causes an out-of-bands write during packet handling, compromising data integrity, confidentiality issues, a denial of service, and remote code execution. (CVE-2022-28733)

A flaw was found in grub2 when handling split HTTP headers. While processing a split HTTP header, grub2 wrongly advances its control pointer to the internal buffer by one position, which can lead to an out-of- bounds write. This flaw allows an attacker to leverage this issue by crafting a malicious set of HTTP packages making grub2 corrupt its internal memory metadata structure. This leads to data integrity and confidentiality issues or forces grub to crash, resulting in a denial of service attack. (CVE-2022-28734)

A flaw was found in grub2. The shim_lock verifier from grub2 allows non-kernel files to be loaded when secure boot is enabled, giving the possibility of unverified code or modules to be loaded when it should not be allowed. (CVE-2022-28735)

A use-after-free vulnerability was found on grub2's chainloader command. This flaw allows an attacker to gain access to restricted data or cause arbitrary code execution if they can establish control from grub's memory allocation pattern. (CVE-2022-28736)

Tenable has extracted the preceding description block directly from the tested product security advisory.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Run 'dnf update --releasever=2022.0.20220719 grub2' to update your system.

See Also

https://alas.aws.amazon.com/AL2022/ALAS-2022-109.html

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

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

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

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

https://alas.aws.amazon.com/cve/html/CVE-2022-28733.html

https://alas.aws.amazon.com/cve/html/CVE-2022-28734.html

https://alas.aws.amazon.com/cve/html/CVE-2022-28735.html

https://alas.aws.amazon.com/cve/html/CVE-2022-28736.html

Plugin Details

Severity: High

ID: 164779

File Name: al2022_ALAS2022-2022-109.nasl

Version: 1.6

Type: local

Agent: unix

Published: 9/7/2022

Updated: 12/11/2024

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 6.9

Temporal Score: 5.1

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

CVSS Score Source: CVE-2021-3696

CVSS v3

Risk Factor: High

Base Score: 8.1

Temporal Score: 7.1

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

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

CVSS Score Source: CVE-2022-28733

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:grub2-debuginfo, p-cpe:/a:amazon:linux:grub2-efi-x64-cdboot, p-cpe:/a:amazon:linux:grub2-efi-aa64, p-cpe:/a:amazon:linux:grub2-tools-efi, p-cpe:/a:amazon:linux:grub2-efi-aa64-modules, p-cpe:/a:amazon:linux:grub2-efi-aa64-ec2, p-cpe:/a:amazon:linux:grub2-debugsource, p-cpe:/a:amazon:linux:grub2-emu, p-cpe:/a:amazon:linux:grub2-tools-extra, cpe:/o:amazon:linux:2022, p-cpe:/a:amazon:linux:grub2-efi-aa64-cdboot, p-cpe:/a:amazon:linux:grub2-efi-x64-modules, p-cpe:/a:amazon:linux:grub2-pc-modules, p-cpe:/a:amazon:linux:grub2-tools-minimal-debuginfo, p-cpe:/a:amazon:linux:grub2-tools-extra-debuginfo, p-cpe:/a:amazon:linux:grub2-efi-x64, p-cpe:/a:amazon:linux:grub2-emu-debuginfo, p-cpe:/a:amazon:linux:grub2-common, p-cpe:/a:amazon:linux:grub2-tools-debuginfo, p-cpe:/a:amazon:linux:grub2-pc, p-cpe:/a:amazon:linux:grub2-tools-minimal, p-cpe:/a:amazon:linux:grub2-tools, p-cpe:/a:amazon:linux:grub2-tools-efi-debuginfo, p-cpe:/a:amazon:linux:grub2-efi-x64-ec2, p-cpe:/a:amazon:linux:grub2-emu-modules

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

Exploit Ease: No known exploits are available

Patch Publication Date: 7/20/2022

Vulnerability Publication Date: 6/16/2022

Reference Information

CVE: CVE-2021-3695, CVE-2021-3696, CVE-2021-3697, CVE-2021-3981, CVE-2022-28733, CVE-2022-28734, CVE-2022-28735, CVE-2022-28736