CVE-2025-0686: Grub2: romfs: integer overflow when handling symlinks may lead to heap based out-of-bounds write when reading dat
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 grubmalloc() operation with a smaller size than expected. As a result, the grubromfsreadsymlink() may cause out-of-bounds writes when the calling grubdiskread() 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.
Other sources
Grub2: romfs: integer overflow when handling symlinks may lead to heap based out-of-bounds write when reading dat
— Microsoft
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 buffers size, however it misses to properly check for integer overflows. A maliciously 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 grubromfsreadsymlink() may cause a out-of-bounds writes when calling grubdiskread() function. This flaw may be leveraged to corrupt grub's internal critical data and may result in arbitrary code execution by-passing secure boot protections.
— Red Hat
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-0686?
CVE-2025-0686 has been classified with a severity rating indicating a potential for significant impact due to improper handling of user-controlled parameters.
What systems are affected by CVE-2025-0686?
CVE-2025-0686 affects systems using GNU GRUB, specifically the romfs filesystem module.
How do I fix CVE-2025-0686?
To fix CVE-2025-0686, it is recommended to update to the latest patched version of GNU GRUB provided by your distribution.
What kind of attack can exploit CVE-2025-0686?
CVE-2025-0686 could be exploited through a crafted romfs filesystem that triggers integer overflows leading to potential code execution.
Is CVE-2025-0686 under active exploitation?
As of now, there are no reported instances of CVE-2025-0686 being actively exploited in the wild.