CVE-2026-13212
Received Received - Intake

Out-of-Bounds Read in Zephyr Virtio Driver Leads to Arbitrary Code Execution

Vulnerability report for CVE-2026-13212, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-24

Last updated on: 2026-08-24

Assigner: Zephyr Project

Description

The Zephyr virtio driver does not validate the descriptor-chain head id that the virtio device writes into the used ring. In virtio_isr() (drivers/virtio/virtio_common.c), the device-written vq->used->ring[idx].id is used directly as an index into vq->recv_cbs[] and vq->desc[], which are both allocated with exactly vq->num entries. recv_cbs[] holds {cb, opaque} callback entries, and the indexed callback pointer is then invoked as cbe.cb(cbe.opaque, used_len). Because the id is consumed as a 16-bit value with no bound check, a malicious or compromised virtio backend (an untrusted hypervisor, or an untrusted hardware/peer-processor virtio device on a PCI or MMIO transport) can supply an id far beyond vq->num. This causes an out-of-bounds read of a {function pointer, argument} pair from heap memory beyond recv_cbs[], after which the driver calls that attacker-shaped pointer in the guest's interrupt context. No guest privileges or user interaction are required; the backend triggers it by writing the shared used ring and raising the queue interrupt. The result is an arbitrary / attacker-influenced function-pointer call in the Zephyr guest, i.e. a control-flow-hijack primitive that can lead to code execution or, at minimum, a reliable crash. The fix rejects any used-ring id >= vq->num before indexing recv_cbs[]/desc[] or invoking the callback. This affects builds using CONFIG_VIRTIO with the PCI or MMIO transport.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-24
Last Modified
2026-08-24
Generated
2026-08-24
AI Q&A
2026-08-24
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
zephyr_project zephyr From CONFIG_VIRTIO (inc)
zephyrproject zephyr From 4.2.0 (inc) to 4.4.2 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-129 The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is in the Zephyr RTOS virtio driver where the device can write a malicious descriptor ID into the used ring without validation. The driver then uses this ID directly to index into arrays allocated for the queue size. If the ID exceeds the array bounds, it reads a function pointer and its argument from heap memory beyond the array. The driver then calls this attacker-controlled function pointer in the guest's interrupt context, allowing arbitrary code execution or a crash.

Detection Guidance

Detecting this vulnerability requires checking if your Zephyr RTOS system uses the vulnerable virtio driver with CONFIG_VIRTIO enabled for PCI or MMIO transport. Inspect the kernel configuration for CONFIG_VIRTIO and verify the driver version against the patched commit fe47dbca080957c425383cc1d5bdc7d48a41d4a5. No direct network detection commands are applicable as this is a local guest OS issue.

Impact Analysis

If you use Zephyr RTOS with CONFIG_VIRTIO enabled for PCI or MMIO transport, a malicious or compromised virtio backend (like an untrusted hypervisor or hardware device) could exploit this to execute arbitrary code in your guest system. This could lead to full system compromise, data theft, or denial of service by crashing the system.

Compliance Impact

This vulnerability could impact compliance with GDPR and HIPAA by enabling arbitrary code execution or crashes in Zephyr-based systems. A compromised virtio backend could exploit this to execute malicious code in the guest system, potentially leading to unauthorized data access, modification, or disclosure. This violates confidentiality and integrity requirements under GDPR and HIPAA, especially in environments where Zephyr is used in virtualized or embedded systems handling sensitive data.

Mitigation Strategies

Apply the official patch from the Zephyr project commit fe47dbca080957c425383cc1d5bdc7d48a41d4a5 which adds validation to reject descriptor IDs exceeding vq->num. If patching is not immediately possible, disable CONFIG_VIRTIO in your Zephyr build configuration to prevent the vulnerable driver from loading.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-13212. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart