CVE Vulnerabilities

CVE-2025-0622

Use After Free

Published: Feb 18, 2025 | Modified: Sep 18, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
6.4 MODERATE
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM

A flaw was found in command/gpg. In some scenarios, hooks created by loaded modules are not removed when the related module is unloaded. This flaw allows an attacker to force grub2 to call the hooks once the module that registered it was unloaded, leading to a use-after-free vulnerability. If correctly exploited, this vulnerability may result in arbitrary code execution, eventually allowing the attacker to bypass secure boot protections.

Weakness

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory “belongs” to the code that operates on the new pointer.

Affected Software

Name Vendor Start Version End Version
Red Hat Enterprise Linux 9 RedHat grub2-1:2.06-104.el9_6 *
Grub2 Ubuntu esm-infra-legacy/trusty *
Grub2-signed Ubuntu esm-infra-legacy/trusty *
Grub2-signed Ubuntu focal *
Grub2-signed Ubuntu oracular *
Grub2-unsigned Ubuntu focal *
Grub2-unsigned Ubuntu oracular *

Potential Mitigations

References