Bug 2379185 (CVE-2025-38314) - CVE-2025-38314 kernel: virtio-pci: Fix result size returned for the admin command completion
Summary: CVE-2025-38314 kernel: virtio-pci: Fix result size returned for the admin com...
Keywords:
Status: NEW
Alias: CVE-2025-38314
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-10 08:02 UTC by OSIDB Bzimport
Modified: 2025-07-11 11:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-10 08:02:16 UTC
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.

Comment 1 Avinash Hanwate 2025-07-11 11:01:31 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025071015-CVE-2025-38314-5977@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.