Amazon Linux 2023 : grub2-common, grub2-efi-aa64, grub2-efi-aa64-cdboot (ALAS2023-2023-020)

critical Nessus Plugin ID 173192


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


It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2023-2023-020 advisory.

- A crafted 16-bit grayscale PNG image may lead to a out-of-bounds write in the heap area. An attacker may take advantage of that to cause heap data corruption or eventually arbitrary code execution and circumvent secure boot protections. This issue has a high complexity to be exploited as an attacker needs to perform some triage over the heap layout to achieve signifcant results, also the values written into the memory are repeated three times in a row making difficult to produce valid payloads. This flaw affects grub2 versions prior grub-2.12. (CVE-2021-3695)

- A heap out-of-bounds write may heppen during the handling of Huffman tables in the PNG reader. This may lead to data corruption in the heap space. Confidentiality, Integrity and Availablity impact may be considered Low as it's very complex to an attacker control the encoding and positioning of corrupted Huffman entries to achieve results such as arbitrary code execution and/or secure boot circumvention. This flaw affects grub2 versions prior grub-2.12. (CVE-2021-3696)

- A crafted JPEG image may lead the JPEG reader to underflow its data pointer, allowing user-controlled data to be written in heap. To a successful to be performed the attacker needs to perform some triage over the heap layout and craft an image with a malicious format and payload. This vulnerability can lead to data corruption and eventual code execution or secure boot circumvention. This flaw affects grub2 versions prior grub-2.12. (CVE-2021-3697)

- A flaw in grub2 was found where its configuration file, known as grub.cfg, is being created with the wrong permission set allowing non privileged users to read its content. This represents a low severity confidentiality issue, as those users can eventually read any encrypted passwords present in grub.cfg.
This flaw affects grub2 2.06 and previous versions. This issue has been fixed in grub upstream but no version with the fix is currently released. (CVE-2021-3981)

- A buffer overflow was found in grub_font_construct_glyph(). A malicious crafted pf2 font can lead to an overflow when calculating the max_glyph_size value, allocating a smaller than needed buffer for the glyph, this further leads to a buffer overflow and a heap based out-of-bounds write. An attacker may use this vulnerability to circumvent the secure boot mechanism. (CVE-2022-2601)

- When rendering certain unicode sequences, grub2's font code doesn't proper validate if the informed glyph's width and height is constrained within bitmap size. As consequence an attacker can craft an input which will lead to a out-of-bounds write into grub2's heap, leading to memory corruption and availability issues. Although complex, arbitrary code execution could not be discarded. (CVE-2022-3775)

- grub2: Integer underflow in grub_net_recv_ip4_packets (CVE-2022-28733)

- grub2: Out-of-bound write when handling split HTTP headers (CVE-2022-28734)

- grub2: shim_lock verifier allows non-kernel files to be loaded (CVE-2022-28735)

- grub2: use-after-free in grub_cmd_chainloader() (CVE-2022-28736)

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


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

See Also

Plugin Details

Severity: Critical

ID: 173192

File Name: al2023_ALAS2023-2023-020.nasl

Version: 1.2

Type: local

Agent: unix

Published: 3/21/2023

Updated: 7/31/2023

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

Risk Information


Risk Factor: High

Score: 7.3


Risk Factor: Medium

Base Score: 6.9

Temporal Score: 5.4

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

CVSS Score Source: CVE-2021-3696


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

CVSS Score Source: CVE-2022-28734

Vulnerability Information

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

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: 2/17/2023

Vulnerability Publication Date: 7/30/2020

Reference Information

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

IAVA: 2020-A-0349