CVE-2025-38314

virtio-pci: Fix result size returned for the admin command completion

State
Published
Severity
7.3 High
Published
Jul 10, 2025
Updated
Aug 5, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.3 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 704806ca400e5daa86c110f14bfdda9d28203bb7 to before 920b6720bb63893b81516c0c45884a8350f9e4bfAffected
  • 704806ca400e5daa86c110f14bfdda9d28203bb7 to before 9ef41ebf787fcbde99ac404ae473f8467641f983Affected
LinuxLinux
  • 6.13Affected
  • before 6.13Not affected
  • 6.15.3 through 6.15.*Not affected
  • 6.16 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.