Logo
componentgrub2
Name
grub2
Version
2.12
Type
library
Description
-
Licenses
GPL-3.0+
PURL
-
CPE
cpe:2.3:a:gnu:grub2:2.12:-:*:*:*:*:*:*

Other Versions#


Project
Branch
Version
master
2.14

Patches#


#
Title
Author
Resolve
1
Add missing grub-core/extra_deps.lst file in release tarball
Julien Olivain <ju.o@free.fr>
2
misc: Implement grub_strlcpy()
B Horn <b@horn.uk>
3
fs/ufs: Fix a heap OOB write
B Horn <b@horn.uk>
4
fs/hfs: Fix stack OOB write with grub_strcpy()
B Horn <b@horn.uk>
CVE-2024-45782
CVE-2024-56737
5
fs/tar: Initialize name in grub_cpio_find_file()
B Horn <b@horn.uk>
6
fs/tar: Integer overflow leads to heap OOB write
Lidong Chen <lidong.chen@oracle.com>
CVE-2024-45780
7
fs/f2fs: Set a grub_errno if mount fails
B Horn <b@horn.uk>
8
fs/hfsplus: Set a grub_errno if mount fails
B Horn <b@horn.uk>
9
fs/iso9660: Set a grub_errno if mount fails
B Horn <b@horn.uk>
10
fs/iso9660: Fix invalid free
Michael Chang <mchang@suse.com>
11
fs/jfs: Fix OOB read in jfs_getent()
Lidong Chen <lidong.chen@oracle.com>
12
fs/jfs: Fix OOB read caused by invalid dir slot index
Lidong Chen <lidong.chen@oracle.com>
13
fs/jfs: Use full 40 bits offset and address for a data extent
Lidong Chen <lidong.chen@oracle.com>
14
fs/jfs: Inconsistent signed/unsigned types usage in return
Lidong Chen <lidong.chen@oracle.com>
15
fs/ext2: Fix out-of-bounds read for inline extents
Michael Chang <mchang@suse.com>
16
fs/xfs: Fix out-of-bounds read
Michael Chang <mchang@suse.com>
17
fs/xfs: Ensuring failing to mount sets a grub_errno
B Horn <b@horn.uk>
18
kern/file: Ensure file->data is set
B Horn <b@horn.uk>
19
kern/file: Implement filesystem reference counting
B Horn <b@horn.uk>
20
disk/loopback: Reference tracking for the loopback
B Horn <b@horn.uk>
21
kern/disk: Limit recursion depth
B Horn <b@horn.uk>
22
kern/partition: Limit recursion in part_iterate()
B Horn <b@horn.uk>
23
script/execute: Limit the recursion depth
B Horn <b@horn.uk>
24
net: Unregister net_default_ip and net_default_mac variables
B Horn <b@horn.uk>
25
net: Remove variables hooks when interface is unregisted
B Horn <b@horn.uk>
26
net: Fix OOB write in grub_net_search_config_file()
B Horn <b@horn.uk>
27
net/tftp: Fix stack buffer overflow in tftp_open()
B Horn <b@horn.uk>
28
video/readers/jpeg: Do not permit duplicate SOF0 markers in
Daniel Axtens <dja@axtens.net>
29
kern/dl: Fix for an integer overflow in grub_dl_ref()
B Horn <b@horn.uk>
30
kern/dl: Check for the SHF_INFO_LINK flag in
B Horn <b@horn.uk>
31
commands/extcmd: Missing check for failed allocation
Lidong Chen <lidong.chen@oracle.com>
32
commands/ls: Fix NULL dereference
B Horn <b@horn.uk>
33
commands/pgp: Unregister the "check_signatures" hooks on
B Horn <b@horn.uk>
34
normal: Remove variables hooks on module unload
B Horn <b@horn.uk>
35
gettext: Remove variables hooks on module unload
B Horn <b@horn.uk>
36
gettext: Integer overflow leads to heap OOB write or read
Lidong Chen <lidong.chen@oracle.com>
37
gettext: Integer overflow leads to heap OOB write
Lidong Chen <lidong.chen@oracle.com>
CVE-2024-45777
38
commands/read: Fix an integer overflow when supplying more
Jonathan Bar Or <jonathanbaror@gmail.com>
39
commands/test: Stack overflow due to unlimited recursion
Lidong Chen <lidong.chen@oracle.com>
40
commands/minicmd: Block the dump command in lockdown mode
B Horn <b@horn.uk>
41
commands/memrw: Disable memory reading in lockdown mode
B Horn <b@horn.uk>
42
commands/hexdump: Disable memory reading in lockdown mode
B Horn <b@horn.uk>
43
fs/bfs: Disable under lockdown
Daniel Axtens <dja@axtens.net>
CVE-2024-45778
CVE-2024-45779
44
fs: Disable many filesystems under lockdown
Daniel Axtens <dja@axtens.net>
CVE-2025-0677
CVE-2025-0684
CVE-2025-0685
CVE-2025-0686
CVE-2025-0689
45
disk: Use safe math macros to prevent overflows
Alec Brown <alec.r.brown@oracle.com>
46
disk: Prevent overflows when allocating memory for arrays
Alec Brown <alec.r.brown@oracle.com>
47
disk: Check if returned pointer for allocated memory is NULL
Alec Brown <alec.r.brown@oracle.com>
48
disk/ieee1275/ofdisk: Call grub_ieee1275_close() when
Alec Brown <alec.r.brown@oracle.com>
49
fs: Use safe math macros to prevent overflows
Lidong Chen <lidong.chen@oracle.com>
50
fs: Prevent overflows when allocating memory for arrays
Lidong Chen <lidong.chen@oracle.com>
CVE-2025-0678
CVE-2025-1125
51
fs: Prevent overflows when assigning returned values from
Lidong Chen <lidong.chen@oracle.com>
52
fs/zfs: Use safe math macros to prevent overflows
Lidong Chen <lidong.chen@oracle.com>
53
fs/zfs: Prevent overflows when allocating memory for arrays
Lidong Chen <lidong.chen@oracle.com>
54
fs/zfs: Check if returned pointer for allocated memory is
Lidong Chen <lidong.chen@oracle.com>
55
fs/zfs: Add missing NULL check after grub_strdup() call
Lidong Chen <lidong.chen@oracle.com>
56
net: Use safe math macros to prevent overflows
Lidong Chen <lidong.chen@oracle.com>
57
net: Prevent overflows when allocating memory for arrays
Lidong Chen <lidong.chen@oracle.com>
58
net: Check if returned pointer for allocated memory is NULL
Alec Brown <alec.r.brown@oracle.com>
59
fs/sfs: Check if allocated memory is NULL
Alec Brown <alec.r.brown@oracle.com>
60
script/execute: Fix potential underflow and NULL dereference
Lidong Chen <lidong.chen@oracle.com>
61
osdep/unix/getroot: Fix potential underflow
Lidong Chen <lidong.chen@oracle.com>
62
misc: Ensure consistent overflow error messages
Lidong Chen <lidong.chen@oracle.com>
63
bus/usb/ehci: Define GRUB_EHCI_TOGGLE as grub_uint32_t
Alec Brown <alec.r.brown@oracle.com>
64
normal/menu: Use safe math to avoid an integer overflow
Alec Brown <alec.r.brown@oracle.com>
65
kern/partition: Add sanity check after grub_strtoul() call
Lidong Chen <lidong.chen@oracle.com>
66
kern/misc: Add sanity check after grub_strtoul() call
Lidong Chen <lidong.chen@oracle.com>
67
loader/i386/linux: Cast left shift to grub_uint32_t
Alec Brown <alec.r.brown@oracle.com>
68
loader/i386/bsd: Use safe math to avoid underflow
Alec Brown <alec.r.brown@oracle.com>
69
fs/ext2: Rework out-of-bounds read for inline and external
Michael Chang <mchang@suse.com>
70
fs/xfs: Fix grub_xfs_iterate_dir return value in case of
Egor Ignatov <egori@altlinux.org>
71
fs/xfs: Propagate incorrect inode error from
Egor Ignatov <egori@altlinux.org>
72
fs/xfs: Handle root inode read failure in grub_xfs_mount
Egor Ignatov <egori@altlinux.org>
73
net/drivers/ieee1275/ofnet: Add missing grub_malloc()
Nicolas Frayer <nfrayer@redhat.com>
74
Constant-time grub_crypto_memcmp()
Gary Lin <glin@suse.com>
CVE-2024-56738

Vulnerabilities#


Name
Analysis
Description
Exploitable
A vulnerability in the GRUB2 bootloader has been identified in the normal module. This flaw, a memory Use After Free issue, occurs because the normal_exit command is not properly unregistered when its related module is unloaded. An attacker can exploit this condition by invoking the command after the module has been removed, causing the system to improperly access a previously freed memory location. This leads to a system crash or possible impacts in data confidentiality and integrity.
Exploitable
A vulnerability has been identified in the GRUB2 bootloader's normal command that poses an immediate Denial of Service (DoS) risk. This flaw is a Use-after-Free issue, caused because the normal command is not properly unregistered when the module is unloaded. An attacker who can execute this command can force the system to access memory locations that are no longer valid. Successful exploitation leads directly to system instability, which can result in a complete crash and halt system availability. Impact on the data integrity and confidentiality is also not discarded.
Exploitable
A Use-After-Free vulnerability has been discovered in GRUB's gettext module. This flaw stems from a programming error where the gettext command remains registered in memory after its module is unloaded. An attacker can exploit this condition by invoking the orphaned command, causing the application to access a memory location that is no longer valid. An attacker could exploit this vulnerability to cause grub to crash, leading to a Denial of Service. Possible data integrity or confidentiality compromise is not discarded.
Exploitable
A vulnerability has been identified in the GRUB (Grand Unified Bootloader) component. This flaw occurs because the bootloader mishandles string conversion when reading information from a USB device, allowing an attacker to exploit inconsistent length values. A local attacker can connect a maliciously configured USB device during the boot sequence to trigger this issue. A successful exploitation may lead GRUB to crash, leading to a Denial of Service. Data corruption may be also possible, although given the complexity of the exploit the impact is most likely limited.
Exploitable
A use-after-free vulnerability has been identified in the GNU GRUB (Grand Unified Bootloader). The flaw occurs because the file-closing process incorrectly retains a memory pointer, leaving an invalid reference to a file system structure. An attacker could exploit this vulnerability to cause grub to crash, leading to a Denial of Service. Possible data integrity or confidentiality compromise is not discarded.
Exploitable
A vulnerability has been identified in the GRUB2 bootloader's network module that poses an immediate Denial of Service (DoS) risk. This flaw is a Use-after-Free issue, caused because the net_set_vlan command is not properly unregistered when the network module is unloaded from memory. An attacker who can execute this command can force the system to access memory locations that are no longer valid. Successful exploitation leads directly to system instability, which can result in a complete crash and halt system availability
Exploitable
A flaw was found in systems utilizing LUKS-encrypted disks with GRUB configured for TPM-based auto-decryption. When GRUB is set to automatically decrypt disks using keys stored in the TPM, it reads the decryption key into system memory. If an attacker with physical access can corrupt the underlying filesystem superblock, GRUB will fail to locate a valid filesystem and enter rescue mode. At this point, the disk is already decrypted, and the decryption key remains loaded in system memory. This scenario may allow an attacker with physical access to access the unencrypted data without any further authentication, thereby compromising data confidentiality. Furthermore, the ability to force this state through filesystem corruption also presents a data integrity concern.
Patched
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.
Exploitable
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.
Exploitable
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.
Patched
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.
Patched
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.
Patched
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.
Patched
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.
Patched
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.
Exploitable
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.
Exploitable
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.
Exploitable
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.
Patched
GNU GRUB (aka GRUB2) through 2.12 does not use a constant-time algorithm for grub_crypto_memcmp and thus allows side-channel attacks.
Patched
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.
Exploitable
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.
Patched
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.
Exploitable
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.
Patched
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.
Patched
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.
Patched
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.
Patched
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.
Exploitable
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.
Exploitable
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.
Exploitable
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.
Exploitable
GRUB2 does not call the module fini functions on exit, leading to Debian/Ubuntu's peimage GRUB2 module leaving UEFI system table hooks after exit. This lead to a use-after-free condition, and could possibly lead to secure boot bypass.