Skip to content

CVE-2025-0677 Grub2: ufs: integer overflow may lead to heap based out-of-bounds write when handling symlinks

MediumCVSS 6.4 EPSS 0.33%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebianRed Hat

Description

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.

Affected products

ProductAffected versionsFixed in
cbl-mariner grub2(CBL-Mariner:2.0) < 2.06-15 2.06-15
azure linux grub2(Azure Linux:3.0) < 2.06-25 2.06-25
debian/grub2(Debian:12) < 2.06-13+deb12u2 2.06-13+deb12u2
debian/grub2(Debian:12) = 2.06-13 No fix listed
debian/grub2(Debian:12) = 2.06-13+deb12u1 No fix listed
debian/grub2(Debian:13) < 2.12-6 2.12-6
debian/grub2(Debian:14) < 2.12-6 2.12-6
grub2 <= 2.12 No fix listed
redhat enterprise linux < 1:2.12-15.el10_0 1:2.12-15.el10_0
redhat enterprise linux < 1:2.06-104.el9_6 1:2.06-104.el9_6
redhat rhel els = 7 No fix listed
redhat enterprise linux = 8 No fix listed
redhat openshift All versions No fix listed
ubuntu/grub2-signed(Ubuntu:22.04) All versions No fix listed
ubuntu/grub2-unsigned(Ubuntu:22.04) All versions No fix listed
ubuntu/grub2-signed(Ubuntu:24.04) All versions No fix listed
ubuntu/grub2-unsigned(Ubuntu:24.04) All versions No fix listed
ubuntu/grub2-signed(Ubuntu:26.04) All versions No fix listed
ubuntu/grub2-unsigned(Ubuntu:26.04) All versions No fix listed
ubuntu/grub2-signed(Ubuntu:26.10) All versions No fix listed
ubuntu/grub2-unsigned(Ubuntu:26.10) All versions No fix listed

References