# CVE-2025-38314: virtio-pci: Fix result size returned for the admin command completion

- Severity: High 7.3 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2025-07-10T07:42:21.937Z
- Modified: 2026-08-05T12:01:06.485Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 704806ca400e5daa86c110f14bfdda9d28203bb7 before 920b6720bb63893b81516c0c45884a8350f9e4bf; from 704806ca400e5daa86c110f14bfdda9d28203bb7 before 9ef41ebf787fcbde99ac404ae473f8467641f983; 6.13 (not affected: before 6.13; from 6.15.3 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.13 before 6.15.3

## Every score

- Linux: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/920b6720bb63893b81516c0c45884a8350f9e4bf> (patch)
- <https://git.kernel.org/stable/c/9ef41ebf787fcbde99ac404ae473f8467641f983> (patch)

## Sources

- CVE List: [CVE-2025-38314](https://www.cve.org/CVERecord?id=CVE-2025-38314), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-38314](https://nvd.nist.gov/vuln/detail/CVE-2025-38314), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-38314 · Whole record: https://cve.day/CVE-2025-38314.json · Rebuilt by cve.day 2026-11-25T22:59:01.070Z
