CVE-2025-38314

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-38314
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38314.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-38314
Downstream
Published
2025-07-10T07:42:21Z
Modified
2025-10-16T01:57:36.397210Z
Summary
virtio-pci: Fix result size returned for the admin command completion
Details

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 virtiopciadmindevpartsget() is 8 bytes larger than the actual result data size. This occurs because the resultsgsize field of the command is filled with the result length from virtqueueget_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 virtqueuegetbuf().

This fix has been tested through live migrations with virtio-net, virtio-net-transitional, and virtio-blk devices.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
704806ca400e5daa86c110f14bfdda9d28203bb7
Fixed
920b6720bb63893b81516c0c45884a8350f9e4bf
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
704806ca400e5daa86c110f14bfdda9d28203bb7
Fixed
9ef41ebf787fcbde99ac404ae473f8467641f983

Affected versions

v6.*

v6.12
v6.12-rc6
v6.12-rc7
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.14
v6.14-rc1
v6.14-rc2
v6.14-rc3
v6.14-rc4
v6.14-rc5
v6.14-rc6
v6.14-rc7
v6.15
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.15.1
v6.15.2

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.15.3