一、 漏洞 CVE-2025-0677 基础信息
漏洞信息
                                        # Grub2: ufs: 处理符号链接时,整数溢出可能导致基于堆的越界写入

## 漏洞概述
GRUB2中的UFS模块在处理符号链接查找时,未能正确检查符号链接数据大小是否溢出,导致分配的缓冲区大小不足。这使得在读取磁盘数据时会出现缓冲区溢出,进而导致堆数据损坏和任意代码执行,可用于绕过安全启动机制。

## 影响版本
未具体列出受影响的版本。

## 漏洞细节
在GRUB2的UFS模块处理符号链接时,它根据inode的数据大小分配内部缓冲区以读取文件内容,但未检查符号链接数据大小是否溢出。当发生溢出时,`grub_malloc()`将被调用,并传入一个比实际需要的小的值。在进一步从磁盘读取数据时,`grub_ufs_lookup_symlink()`函数可能会在分配的缓冲区末尾写入数据,导致缓冲区溢出。

## 影响
攻击者可以通过创建恶意文件系统来利用此漏洞,导致堆数据损坏,并实现任意代码执行,从而绕过安全启动机制。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Grub2: ufs: integer overflow may lead to heap based out-of-bounds write when handling symlinks
来源:美国国家漏洞数据库 NVD
漏洞描述信息
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.
来源:美国国家漏洞数据库 NVD
CVSS信息
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
来源:美国国家漏洞数据库 NVD
漏洞类别
跨界内存写
来源:美国国家漏洞数据库 NVD
漏洞标题
GNU GRUB 缓冲区错误漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
GNU GRUB是GNU社区的一款Linux系统引导程序。 GNU GRUB存在缓冲区错误漏洞,该漏洞源于UFS模块包含一个整数溢出问题,导致处理符号链接时发生基于堆的越界写入。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
缓冲区错误
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-0677 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2025-0677 的情报信息
  • 标题: CVE-2025-0677 - Red Hat Customer Portal -- 🔗来源链接

    标签: vdb-entry x_refsource_REDHAT

  • 标题: 2346116 – (CVE-2025-0677) CVE-2025-0677 grub2: UFS: Integer overflow may lead to heap based out-of-bounds write when handling symlinks -- 🔗来源链接

    标签: issue-tracking x_refsource_REDHAT

  • 标题: RHSA-2025:6990 - Security Advisory - Red Hat Customer Portal -- 🔗来源链接

    标签: vendor-advisory x_refsource_REDHAT

    神龙速读
  • https://nvd.nist.gov/vuln/detail/CVE-2025-0677