CVE-2025-38314 virtio-pci: Fix result size returned for the admin command completion
A flaw in the Linux kernel's virtio-pci driver returns an oversized result size, potentially exposing extra memory data during admin command completions.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-38314?
CVE-2025-38314 is a high-severity vulnerability in Linux kernel, published on 10 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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: 1. The state transferred to the destination includes 8 bytes of extra data at the end. 2. 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.
Which versions are affected by CVE-2025-38314?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-38314?
Apply the vendor's patch.
Is CVE-2025-38314 being exploited?
There is no known exploitation of CVE-2025-38314 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-38314, GHSA-826j-xvc4-rfgh, UBUNTU-CVE-2025-38314.