CVE-2025-1125: Grub2: fs/hfs: integer overflow may lead to heap based out-of-bounds write
Grub2: fs/hfs: integer overflow may lead to heap based out-of-bounds write
Other sources
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 grubmalloc() operation with a smaller size than expected. As a result the hfsplusopencompressedreal() 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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.06-25 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.06-15
Event History
Frequently Asked Questions
What is the severity of CVE-2025-1125?
CVE-2025-1125 is classified as a high severity vulnerability due to its potential for integer overflow that may lead to memory corruption.
How do I fix CVE-2025-1125?
To fix CVE-2025-1125, update to the latest version of GNU GRUB that includes patches addressing this vulnerability.
What systems are affected by CVE-2025-1125?
CVE-2025-1125 affects systems utilizing GNU GRUB, particularly those using the hfs filesystem.
How does CVE-2025-1125 exploit the system?
CVE-2025-1125 exploits integer overflows caused by mishandling user-controlled parameters in filesystem metadata.
Can CVE-2025-1125 lead to remote code execution?
Yes, a maliciously crafted hfs filesystem targeted at a vulnerable GRUB installation may lead to remote code execution.