CVE-2026-18917
libvirt: Integer overflow in NodeGetFreePages RPC handler leading to heap buffer overflow
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 12, 2025
Updated · October 31, 2026
Description
A flaw was found in libvirt. An unprivileged local user could exploit an integer overflow vulnerability in the NodeGetFreePages RPC handler. This flaw allows crafted values to bypass a size check, leading to an undersized memory buffer. Subsequently, real NUMA node data can overwrite this buffer. This heap buffer overflow can corrupt the root libvirt daemon's memory, potentially leading to a denial of service or local privilege escalation.
Statement
This vulnerability is rated Important rather than Moderate because the read-only libvirt socket is accessible to unprivileged local users by default without authentication. Because the libvirt daemon executes with root privileges to manage host virtualization, memory corruption triggered through this interface can result in daemon crashes or potential local privilege escalation. Systems where the libvirt daemon is inactive or environments where local shell access is strictly restricted face reduced risk.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Restrict access to the libvirt read-only Unix socket to limit which local users can reach the vulnerable RPC handler. In /etc/libvirt/libvirtd.conf, set unix_sock_ro_perms to "0770" (or "0700") and configure unix_sock_group to a group containing only trusted users. Alternatively, enable polkit authentication for the read-only socket by setting auth_unix_ro = "polkit", which requires callers to be authorized before any RPC dispatch occurs. After changing the configuration, restart the libvirtd service.
Note: restricting socket access may prevent unprivileged monitoring tools or read-only management clients from connecting.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-190 · Integer Overflow or Wraparound