CVE-2025-0677: Grub2: ufs: integer overflow may lead to heap based out-of-bounds write when handling symlinks
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, grubmalloc() may be called with a smaller value than needed. When further reading the data from the disk into the buffer, the grubufslookupsymlink() 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.
Other sources
When performing a symlink lookup the grub's UFS module check the inode's data size to allocate the internal buffer for reading the file content however it misses to check if the symlink data size has overflown. If that happens grubmalloc() may be called with a smaller value than needed, as consequence when further reading the data from disk into the buffer grubufslookupsymlink() function will write past the end of the allocated size. An attack may leverage that by crafting a malicious filesystem and as a result it will corrupt data stored in the heap, it's possible that arbitrary code execution may be achieved through it and to be used to by-pass secure boot mechanisms.
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-0677?
The severity of CVE-2025-0677 is classified as high due to the potential for buffer overflows.
How do I fix CVE-2025-0677?
To fix CVE-2025-0677, update the GRUB 2 software to the latest version provided by the vendor.
What are the potential exploits of CVE-2025-0677?
CVE-2025-0677 can potentially be exploited to cause denial-of-service attacks or arbitrary code execution.
What software is affected by CVE-2025-0677?
CVE-2025-0677 specifically affects the GRUB 2 software developed by GNU.
How does CVE-2025-0677 impact system security?
CVE-2025-0677 impacts system security by allowing attackers to exploit buffer management flaws to manipulate GRUB operations.