• 公告ID (KylinSec-SA-2025-1646)

摘要:

grub2 security update

安全等级: High

公告ID: KylinSec-SA-2025-1646

发布日期: 2025年3月24日

关联CVE: CVE-2024-45774   CVE-2024-45775   CVE-2024-45776   CVE-2024-45777   CVE-2024-45778   CVE-2024-45779   CVE-2024-45780   CVE-2024-45781   CVE-2024-45782   CVE-2024-45783   CVE-2024-56737   CVE-2025-0622   CVE-2025-0624   CVE-2025-0677   CVE-2025-0678   CVE-2025-0684   CVE-2025-0685   CVE-2025-0686   CVE-2025-0689   CVE-2025-0690   CVE-2025-1118   CVE-2025-1125  

  • 详细介绍

1. 漏洞描述

   

GNU GRUB is a Multiboot boot loader. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn.

Security Fix(es):

A flaw was found in grub2. A specially crafted JPEG file can cause the JPEG parser of grub2 to incorrectly check the bounds of its internal buffers, resulting in an out-of-bounds write. The possibility of overwriting sensitive information to bypass secure boot protections is not discarded.(CVE-2024-45774)

A flaw was found in grub2 where the grub_extcmd_dispatcher() function calls grub_arg_list_alloc() to allocate memory for the grub's argument list. However, it fails to check in case the memory allocation fails. Once the allocation fails, a NULL point will be processed by the parse_option() function, leading grub to crash or, in some rare scenarios, corrupt the IVT data.(CVE-2024-45775)

When reading the language .mo file in grub_mofile_open(), grub2 fails to verify an integer overflow when allocating its internal buffer. A crafted .mo file may lead the buffer size calculation to overflow, leading to out-of-bound reads and writes. This flaw allows an attacker to leak sensitive data or overwrite critical data, possibly circumventing secure boot protections.(CVE-2024-45776)

A flaw was found in grub2. The calculation of the translation buffer when reading a language .mo file in grub_gettext_getstr_from_position() may overflow, leading to a Out-of-bound write. This issue can be leveraged by an attacker to overwrite grub2's sensitive heap data, eventually leading to the circumvention of secure boot protections.(CVE-2024-45777)

A stack overflow flaw was found when reading a BFS file system. A crafted BFS filesystem may lead to an uncontrolled loop, causing grub2 to crash.(CVE-2024-45778)

An integer overflow flaw was found in the BFS file system driver in grub2. When reading a file with an indirect extent map, grub2 fails to validate the number of extent entries to be read. A crafted or corrupted BFS filesystem may cause an integer overflow during the file reading, leading to a heap of bounds read. As a consequence, sensitive data may be leaked, or grub2 will crash.(CVE-2024-45779)

A flaw was found in grub2. When reading tar files, grub2 allocates an internal buffer for the file name. However, it fails to properly verify the allocation against possible integer overflows. It's possible to cause the allocation length to overflow with a crafted tar file, leading to a heap out-of-bounds write. This flaw eventually allows an attacker to circumvent secure boot protections.(CVE-2024-45780)

A flaw was found in grub2. When reading a symbolic link's name from a UFS filesystem, grub2 fails to validate the string length taken as an input. The lack of validation may lead to a heap out-of-bounds write, causing data integrity issues and eventually allowing an attacker to circumvent secure boot protections.(CVE-2024-45781)

A flaw was found in the HFS filesystem. When reading an HFS volume's name at grub_fs_mount(), the HFS filesystem driver performs a strcpy() using the user-provided volume name as input without properly validating the volume name's length. This issue may read to a heap-based out-of-bounds writer, impacting grub's sensitive data integrity and eventually leading to a secure boot protection bypass.(CVE-2024-45782)

A flaw was found in grub2. When failing to mount an HFS+ grub, the hfsplus filesystem driver doesn't properly set an ERRNO value. This issue may lead to a NULL pointer access.(CVE-2024-45783)

GNU GRUB (aka GRUB2) through 2.12 has a heap-based buffer overflow in fs/hfs.c via crafted sblock data in an HFS filesystem.(CVE-2024-56737)

A flaw was found in command/gpg. In some scenarios, hooks created by loaded modules are not removed when the related module is unloaded. This flaw allows an attacker to force grub2 to call the hooks once the module that registered it was unloaded, leading to a use-after-free vulnerability. If correctly exploited, this vulnerability may result in arbitrary code execution, eventually allowing the attacker to bypass secure boot protections.(CVE-2025-0622)

A flaw was found in grub2. During the network boot process, when trying to search for the configuration file, grub copies data from a user controlled environment variable into an internal buffer using the grub_strcpy() function. During this step, it fails to consider the environment variable length when allocating the internal buffer, resulting in an out-of-bounds write. If correctly exploited, this issue may result in remote code execution through the same network segment grub is searching for the boot information, which can be used to by-pass secure boot protections.(CVE-2025-0624)

A flaw was found in grub2. When performing a symlink lookup, the grub's UFS module checks the inode's data size to allocate the internal buffer to read the file content, however, it fails to check if the symlink data size has overflown. When this occurs, grub_malloc() may be called with a smaller value than needed. When further reading the data from the disk into the buffer, the grub_ufs_lookup_symlink() function will write past the end of the allocated size. An attack can leverage this by crafting a malicious filesystem, and as a result, it will corrupt data stored in the heap, allowing for arbitrary code execution used to by-pass secure boot mechanisms.(CVE-2025-0677)

A flaw was found in grub2. When reading data from a squash4 filesystem, grub's squash4 fs module uses user-controlled parameters from the filesystem geometry to determine the internal buffer size, however, it improperly checks for integer overflows. A maliciously crafted filesystem may lead some of those buffer size calculations to overflow, causing it to perform a grub_malloc() operation with a smaller size than expected. As a result, the direct_read() will perform a heap based out-of-bounds write during data reading. This flaw may be leveraged to corrupt grub's internal critical data and may result in arbitrary code execution, by-passing secure boot protections.(CVE-2025-0678)

A flaw was found in grub2. When performing a symlink lookup from a reiserfs filesystem, grub's reiserfs fs module uses user-controlled parameters from the filesystem geometry to determine the internal buffer size, however, it improperly checks for integer overflows. A maliciouly crafted filesystem may lead some of those buffer size calculations to overflow, causing it to perform a grub_malloc() operation with a smaller size than expected. As a result, the grub_reiserfs_read_symlink() will call grub_reiserfs_read_real() with a overflown length parameter, leading to a heap based out-of-bounds write during data reading. This flaw may be leveraged to corrupt grub's internal critical data and can result in arbitrary code execution, by-passing secure boot protections.(CVE-2025-0684)

A flaw was found in grub2. When reading data from a jfs filesystem, grub's jfs filesystem module uses user-controlled parameters from the filesystem geometry to determine the internal buffer size, however, it improperly checks for integer overflows. A maliciouly crafted filesystem may lead some of those buffer size calculations to overflow, causing it to perform a grub_malloc() operation with a smaller size than expected. As a result, the grub_jfs_lookup_symlink() function will write past the internal buffer length during grub_jfs_read_file(). This issue can be leveraged to corrupt grub's internal critical data and may result in arbitrary code execution, by-passing secure boot protections.(CVE-2025-0685)

A flaw was found in grub2. When performing a symlink lookup from a romfs filesystem, grub's romfs filesystem module uses user-controlled parameters from the filesystem geometry to determine the internal buffer size, however, it improperly checks for integer overflows. A maliciously crafted filesystem may lead some of those buffer size calculations to overflow, causing it to perform a grub_malloc() operation with a smaller size than expected. As a result, the grub_romfs_read_symlink() may cause out-of-bounds writes when the calling grub_disk_read() function. This issue may be leveraged to corrupt grub's internal critical data and can result in arbitrary code execution by-passing secure boot protections.(CVE-2025-0686)

When reading data from disk, the grub's UDF filesystem module utilizes the user controlled data length metadata to allocate its internal buffers. In certain scenarios, while iterating through disk sectors, it assumes the read size from the disk is always smaller than the allocated buffer size which is not guaranteed. A crafted filesystem image may lead to a heap-based buffer overflow resulting in critical data to be corrupted, resulting in the risk of arbitrary code execution by-passing secure boot protections.(CVE-2025-0689)

The read command is used to read the keyboard input from the user, while reads it keeps the input length in a 32-bit integer value which is further used to reallocate the line buffer to accept the next character. During this process, with a line big enough it's possible to make this variable to overflow leading to a out-of-bounds write in the heap based buffer. This flaw may be leveraged to corrupt grub's internal critical data and secure boot bypass is not discarded as consequence.(CVE-2025-0690)

A flaw was found in grub2. Grub's dump command is not blocked when grub is in lockdown mode, which allows the user to read any memory information, and an attacker may leverage this in order to extract signatures, salts, and other sensitive information from the memory.(CVE-2025-1118)

When reading data from a hfs filesystem, grub's hfs filesystem module uses user-controlled parameters from the filesystem metadata to calculate the internal buffers size, however it misses to properly check for integer overflows. A maliciouly crafted filesystem may lead some of those buffer size calculation to overflow, causing it to perform a grub_malloc() operation with a smaller size than expected. As a result the hfsplus_open_compressed_real() function will write past of the internal buffer length. This flaw may be leveraged to corrupt grub's internal critical data and may result in arbitrary code execution by-passing secure boot protections.(CVE-2025-1125)

2. 影响范围

cve名称 产品 组件 是否受影响
CVE-2024-45774 KY3.4-5A grub2 Fixed
CVE-2024-45775 KY3.4-5A grub2 Fixed
CVE-2024-45776 KY3.4-5A grub2 Fixed
CVE-2024-45777 KY3.4-5A grub2 Fixed
CVE-2024-45778 KY3.4-5A grub2 Fixed
CVE-2024-45779 KY3.4-5A grub2 Fixed
CVE-2024-45780 KY3.4-5A grub2 Fixed
CVE-2024-45781 KY3.4-5A grub2 Fixed
CVE-2024-45782 KY3.4-5A grub2 Fixed
CVE-2024-45783 KY3.4-5A grub2 Fixed
CVE-2024-56737 KY3.4-5A grub2 Fixed
CVE-2025-0622 KY3.4-5A grub2 Fixed
CVE-2025-0624 KY3.4-5A grub2 Fixed
CVE-2025-0677 KY3.4-5A grub2 Fixed
CVE-2025-0678 KY3.4-5A grub2 Fixed
CVE-2025-0684 KY3.4-5A grub2 Fixed
CVE-2025-0685 KY3.4-5A grub2 Fixed
CVE-2025-0686 KY3.4-5A grub2 Fixed
CVE-2025-0689 KY3.4-5A grub2 Fixed
CVE-2025-0690 KY3.4-5A grub2 Fixed
CVE-2025-1118 KY3.4-5A grub2 Fixed
CVE-2025-1125 KY3.4-5A grub2 Fixed

3. 影响组件

    grub2

4. 修复版本

   

KY3.4-5A

软件名称 架构 版本号
grub2-common noarch 2.04-40.kb1.ky3_4
grub2-efi-aa64-modules noarch 2.04-40.kb1.ky3_4
grub2-efi-ia32-modules noarch 2.04-40.kb1.ky3_4
grub2-efi-x64-modules noarch 2.04-40.kb1.ky3_4
grub2-help noarch 2.04-40.kb1.ky3_4
grub2-pc-modules noarch 2.04-40.kb1.ky3_4
grub2-efi-ia32 x86_64 2.04-40.kb1.ky3_4
grub2-efi-ia32-cdboot x86_64 2.04-40.kb1.ky3_4
grub2-efi-x64 x86_64 2.04-40.kb1.ky3_4
grub2-efi-x64-cdboot x86_64 2.04-40.kb1.ky3_4
grub2-pc x86_64 2.04-40.kb1.ky3_4
grub2-tools x86_64 2.04-40.kb1.ky3_4
grub2-tools-efi x86_64 2.04-40.kb1.ky3_4
grub2-tools-extra x86_64 2.04-40.kb1.ky3_4
grub2-tools-minimal x86_64 2.04-40.kb1.ky3_4
grub2-efi-aa64 aarch64 2.04-40.kb1.ky3_4
grub2-efi-aa64-cdboot aarch64 2.04-40.kb1.ky3_4
grub2-tools aarch64 2.04-40.kb1.ky3_4
grub2-tools-extra aarch64 2.04-40.kb1.ky3_4
grub2-tools-minimal aarch64 2.04-40.kb1.ky3_4

5. 修复方法


方法一:下载安装包进行升级安装
1、通过下载链接下载需要升级的升级包保存,如 xxx.rpm
2、通过rpm命令升级,如 rpm -Uvh xxx.rpm

方法二:通过软件源进行升级安装
1、保持能够连接上互联网
2、通过yum命令升级指定的包,如 yum install 包名

6. 下载链接

   

KY3.4-5A:

x86_64:

     grub2-common   

     grub2-efi-aa64-modules   

     grub2-efi-ia32-modules   

     grub2-efi-x64-modules   

     grub2-help   

     grub2-pc-modules   

     grub2-efi-ia32   

     grub2-efi-ia32-cdboot   

     grub2-efi-x64   

     grub2-efi-x64-cdboot   

     grub2-pc   

     grub2-tools   

     grub2-tools-efi   

     grub2-tools-extra   

     grub2-tools-minimal   

aarch64:

     grub2-common   

     grub2-efi-aa64-modules   

     grub2-efi-ia32-modules   

     grub2-efi-x64-modules   

     grub2-help   

     grub2-pc-modules   

     grub2-efi-aa64   

     grub2-efi-aa64-cdboot   

     grub2-tools   

     grub2-tools-extra   

     grub2-tools-minimal   

上一篇:KylinSec-SA-2025-1645 下一篇:KylinSec-SA-2025-1647