CVE-2025-38314
kernel: virtio-pci: Fix result size returned for the admin command completion
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · July 10, 2025
Updated · October 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
virtio-pci: Fix result size returned for the admin command completion
The result size returned by virtio_pci_admin_dev_parts_get() is 8 bytes larger than the actual result data size. This occurs because the result_sg_size field of the command is filled with the result length from virtqueue_get_buf(), which includes both the data size and an additional 8 bytes of status.
This oversized result size causes two issues:
- The state transferred to the destination includes 8 bytes of extra data at the end.
- The allocated buffer in the kernel may be smaller than the returned size, leading to failures when reading beyond the allocated size.
The commit fixes this by subtracting the status size from the result of virtqueue_get_buf().
This fix has been tested through live migrations with virtio-net, virtio-net-transitional, and virtio-blk devices.
Statement
This vulnerability is rated as having a Moderate impact for Red Hat Enterprise Linux because exploitation requires local access to interact with virtio admin commands and primarily results in out-of-bounds read errors or system crashes rather than arbitrary code execution. The condition occurs within the modern virtio PCI subsystem during device state retrieval, such as in live migration procedures. Older distributions, including Red Hat Enterprise Linux 8 and 9, do not incorporate the affected driver functionality and remain unaffected.
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
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-131 · Incorrect Calculation of Buffer Size