CVE-2025-8860 Overview
A flaw was found in QEMU in the uefi-vars virtual device that can lead to information disclosure. When the guest writes to register UEFI_VARS_REG_BUFFER_SIZE, the .write callback uefi_vars_write is invoked. The function allocates a heap buffer without zeroing the memory, leaving the buffer filled with residual data from prior allocations. When the guest later reads from register UEFI_VARS_REG_PIO_BUFFER_TRANSFER, the .read callback uefi_vars_read returns leftover metadata or other sensitive process memory from the previously allocated buffer, leading to an information disclosure vulnerability.
Critical Impact
A local attacker with low privileges could exploit this vulnerability to read sensitive process memory from the QEMU host process, potentially exposing metadata, credentials, or other confidential information from prior memory allocations.
Affected Products
- QEMU (versions with uefi-vars virtual device support)
- Linux distributions packaging affected QEMU versions
- Virtualization platforms utilizing vulnerable QEMU builds
Discovery Timeline
- 2026-02-18 - CVE-2025-8860 published to NVD
- 2026-02-19 - Last updated in NVD database
Technical Details for CVE-2025-8860
Vulnerability Analysis
This vulnerability is classified under CWE-212 (Improper Removal of Sensitive Information Before Storage or Transfer). The core issue stems from improper memory handling within QEMU's uefi-vars virtual device implementation. When allocating heap buffers for guest-host communication, the code fails to initialize the allocated memory to zero, leaving potentially sensitive data from previous allocations intact.
The vulnerability exists in the interaction between two callback functions. When a guest VM writes to the UEFI_VARS_REG_BUFFER_SIZE register, the uefi_vars_write function allocates a new heap buffer. Because standard memory allocation functions like malloc() do not zero-initialize memory, this buffer contains whatever data previously occupied that memory space. Subsequently, when the guest reads from UEFI_VARS_REG_PIO_BUFFER_TRANSFER, the uefi_vars_read function returns the contents of this uninitialized buffer to the guest, effectively leaking host process memory.
Root Cause
The root cause is the failure to properly sanitize heap-allocated memory before use. The uefi_vars_write callback allocates memory without using memory-zeroing allocation functions such as calloc() or explicitly zeroing the buffer with memset() after allocation. This is a common pattern in information disclosure vulnerabilities where developers assume allocated memory is clean or that the memory will be fully overwritten before being read.
Attack Vector
The attack requires local access with low privileges. An attacker operating within a guest virtual machine can exploit this vulnerability by:
- Triggering a write operation to the UEFI_VARS_REG_BUFFER_SIZE register to force a heap allocation
- Reading from the UEFI_VARS_REG_PIO_BUFFER_TRANSFER register to retrieve the uninitialized buffer contents
- Analyzing the returned data for sensitive information such as memory addresses, cryptographic material, or other process metadata
The vulnerability mechanism involves the guest-to-host communication path through QEMU's virtual device registers. When the guest writes to UEFI_VARS_REG_BUFFER_SIZE, it triggers the allocation of a heap buffer in the QEMU process. This buffer retains residual data from prior allocations, which is then exposed when the guest reads from UEFI_VARS_REG_PIO_BUFFER_TRANSFER. For detailed technical analysis, refer to the Red Hat CVE-2025-8860 Advisory and Red Hat Bug Report #2387588.
Detection Methods for CVE-2025-8860
Indicators of Compromise
- Unusual patterns of register read/write operations to uefi-vars device from guest VMs
- Abnormal memory allocation patterns in QEMU processes associated with uefi-vars operations
- Guest processes repeatedly triggering buffer allocations and reads in rapid succession
Detection Strategies
- Monitor QEMU process behavior for unusual uefi-vars register access patterns
- Implement host-based intrusion detection to flag suspicious guest-to-host memory interactions
- Review QEMU logs for anomalous virtual device operations related to UEFI variable storage
- Deploy memory analysis tools to detect potential information leakage from QEMU processes
Monitoring Recommendations
- Enable detailed logging for QEMU virtual device operations where supported
- Implement runtime monitoring for QEMU processes to detect unusual memory allocation patterns
- Configure alerts for repeated uefi-vars register interactions from guest VMs
- Establish baselines for normal uefi-vars device usage to identify anomalous behavior
How to Mitigate CVE-2025-8860
Immediate Actions Required
- Review deployed QEMU versions for uefi-vars virtual device support and assess exposure
- Apply vendor-provided patches as they become available from QEMU and distribution maintainers
- Consider disabling the uefi-vars virtual device if not required for guest VM operations
- Monitor Red Hat and QEMU upstream advisories for patch availability
Patch Information
Patch information is available through vendor security advisories. Administrators should consult the Red Hat CVE-2025-8860 Advisory and Red Hat Bug Report #2387588 for patch status and availability. Apply vendor-provided updates as they are released through your distribution's package management system.
Workarounds
- Disable the uefi-vars virtual device in QEMU configurations where it is not required for guest operations
- Limit access to systems running affected QEMU versions to trusted users only
- Implement strict guest VM isolation policies to reduce the risk of information leakage
- Consider using alternative UEFI variable storage mechanisms if available
# Configuration example - Disabling uefi-vars device
# When launching QEMU, avoid using the uefi-vars device if not required
# Review your QEMU command line or libvirt XML configurations
# to ensure uefi-vars is not enabled unnecessarily
# Check for uefi-vars device usage in running VMs
ps aux | grep qemu | grep uefi-vars
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


