rootpwn

medium · CVSS v3 5.5

CVE-2026-97994

The Linux kernel vhost-vdpa path accepted VHOST_SET_VRING_NUM values larger than the device maximum, allowing a local process with access to

Overview

The Linux kernel vhost-vdpa path accepted VHOST_SET_VRING_NUM values larger than the device maximum, allowing a local process with access to /dev/vhost-vdpa-* to configure an oversized virtqueue. With vdpa_sim, this can cause an out-of-bounds read in the vring IOTLB path. It matters because it can expose kernel memory or destabilize virtualized network/device workloads.

Description

In the Linux kernel, the following vulnerability has been resolved: vhost/vdpa: reject VRING_NUM larger than device max vhost_vring_set_num() accepts any non-zero power-of-two queue size that fits in 16 bits. vhost-vdpa then passes that value to set_vq_num() without comparing it with get_vq_num_max(). A process with access to /dev/vhost-vdpa-* can therefore configure a queue larger than the device advertises. With vdpa_sim, the worker can walk descriptors beyond the mapped descriptor ring. KASAN reports a 16-byte out-of-bounds read, corresponding to one vring_desc, in the vringh IOTLB path: BUG: KASAN: out-of-bounds in _copy_from_iter Read of size 16 copy_from_iotlb copydesc_iotlb vringh_getdesc_iotlb vdpasim_net_work Cache get_vq_num_max() immediately after reset. Some backends derive it from writable queue-size state, so querying it after SET_NUM may return the current size instead of the device capability. Invalidate the cached value before reset so a failed reset leaves SET_NUM disabled. For VHOST_SET_VRING_NUM, copy the complete vring state once and use the same index and size for validation, vq->num, and set_vq_num(). This ensures that validation and use operate on the same copied values.

Impact

Confidentiality: an out-of-bounds read may disclose kernel memory contents to a local attacker with vhost-vdpa access. Availability: oversized queue handling can cause worker faults or kernel instability in virtualized environments. Integrity is not directly indicated. Impacted systems are hosts running vhost-vdpa/vdpa_sim where untrusted local users or containers can access /dev/vhost-vdpa-*.

Remediation

Apply vendor kernel updates or backports that validate VHOST_SET_VRING_NUM against get_vq_num_max(), cache the maximum after reset, invalidate it before reset, and use a single copied vring state for validation and set_vq_num(). Restrict /dev/vhost-vdpa-* device nodes to trusted administrators or service accounts, and remove or disable unused vhost-vdpa/vdpa_sim modules. Audit privileged containers and virtualization workloads for unnecessary vhost-vdpa access. Monitor for unexpected creation or use of vhost-vdpa devices and apply host hardening.

Risk context

Medium severity with CVSS v3 5.5 and no EPSS data provided. Treat as moderate urgency, prioritizing hosts where local untrusted users or containers can reach vhost-vdpa device nodes. Patch during normal maintenance or sooner if vhost-vdpa is exposed to untrusted workloads.

Affected products

  • Linux kernel
  • vhost-vdpa
  • vdpa_sim

Scores

Severity
medium
CVSS v2
4.9
CVSS v3
5.5
CVSS v4
—
EPSS
—

linux-kernel vhost-vdpa vdpa out-of-bounds-read local-access virtualization memory

← All CVEs