CVE-2026-13212: memory-safety in zephyrproject zephyr
CVE-2026-13212 is a high-severity memory safety vulnerability in the Zephyr project's virtio driver. The flaw arises because the driver does not validate the descriptor-chain head id written by the virtio device into the used ring. This lack of bounds checking allows a malicious or compromised virtio backend to cause an out-of-bounds read and invoke an attacker-controlled function pointer in the guest's interrupt context. This can lead to arbitrary code execution or a crash without requiring guest privileges or user interaction. The vulnerability affects Zephyr builds using CONFIG_VIRTIO with PCI or MMIO transport, specifically versions 4.2.0 and from 4.2.0 up to but not including 4.4.2. A fix has been implemented that rejects invalid used-ring ids before indexing or invoking callbacks.
AI Analysis
Technical Summary
The Zephyr virtio driver fails to validate the descriptor-chain head id that the virtio device writes into the used ring. In the function virtio_isr() (drivers/virtio/virtio_common.c), the device-provided vq->used->ring[idx].id is used directly as an index into arrays vq->recv_cbs[] and vq->desc[], each allocated with exactly vq->num entries. Because the id is treated as a 16-bit value without bounds checking, a malicious or compromised virtio backend (such as an untrusted hypervisor or hardware device on PCI or MMIO transport) can supply an id beyond vq->num. This causes an out-of-bounds read of a function pointer and argument pair from heap memory beyond recv_cbs[], and the driver then calls this attacker-shaped pointer in the guest's interrupt context. This results in a control-flow hijack primitive that can lead to arbitrary code execution or a crash. The vulnerability affects Zephyr versions 4.2.0 and all versions from 4.2.0 up to but excluding 4.4.2 when built with CONFIG_VIRTIO using PCI or MMIO transport. The fix involves rejecting any used-ring id greater than or equal to vq->num before indexing or invoking callbacks.
Potential Impact
An attacker controlling the virtio backend (such as an untrusted hypervisor or device) can trigger an out-of-bounds read and execute an attacker-influenced function pointer call within the Zephyr guest's interrupt context. This can lead to arbitrary code execution or a reliable crash. No privileges or user interaction are required on the guest side, making this a serious risk in environments where the virtio backend is not fully trusted.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The described fix rejects any used-ring id greater than or equal to vq->num before indexing or invoking callbacks, which mitigates the vulnerability. Until an official patch or update is applied, avoid running untrusted virtio backends or isolate the affected Zephyr builds. Monitor vendor communications for an official fix.
CVE-2026-13212: memory-safety in zephyrproject zephyr
Description
CVE-2026-13212 is a high-severity memory safety vulnerability in the Zephyr project's virtio driver. The flaw arises because the driver does not validate the descriptor-chain head id written by the virtio device into the used ring. This lack of bounds checking allows a malicious or compromised virtio backend to cause an out-of-bounds read and invoke an attacker-controlled function pointer in the guest's interrupt context. This can lead to arbitrary code execution or a crash without requiring guest privileges or user interaction. The vulnerability affects Zephyr builds using CONFIG_VIRTIO with PCI or MMIO transport, specifically versions 4.2.0 and from 4.2.0 up to but not including 4.4.2. A fix has been implemented that rejects invalid used-ring ids before indexing or invoking callbacks.
CVSS v3.1
Score 8.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Zephyr virtio driver fails to validate the descriptor-chain head id that the virtio device writes into the used ring. In the function virtio_isr() (drivers/virtio/virtio_common.c), the device-provided vq->used->ring[idx].id is used directly as an index into arrays vq->recv_cbs[] and vq->desc[], each allocated with exactly vq->num entries. Because the id is treated as a 16-bit value without bounds checking, a malicious or compromised virtio backend (such as an untrusted hypervisor or hardware device on PCI or MMIO transport) can supply an id beyond vq->num. This causes an out-of-bounds read of a function pointer and argument pair from heap memory beyond recv_cbs[], and the driver then calls this attacker-shaped pointer in the guest's interrupt context. This results in a control-flow hijack primitive that can lead to arbitrary code execution or a crash. The vulnerability affects Zephyr versions 4.2.0 and all versions from 4.2.0 up to but excluding 4.4.2 when built with CONFIG_VIRTIO using PCI or MMIO transport. The fix involves rejecting any used-ring id greater than or equal to vq->num before indexing or invoking callbacks.
Potential Impact
An attacker controlling the virtio backend (such as an untrusted hypervisor or device) can trigger an out-of-bounds read and execute an attacker-influenced function pointer call within the Zephyr guest's interrupt context. This can lead to arbitrary code execution or a reliable crash. No privileges or user interaction are required on the guest side, making this a serious risk in environments where the virtio backend is not fully trusted.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The described fix rejects any used-ring id greater than or equal to vq->num before indexing or invoking callbacks, which mitigates the vulnerability. Until an official patch or update is applied, avoid running untrusted virtio backends or isolate the affected Zephyr builds. Monitor vendor communications for an official fix.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-24T15:29:15.274Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a8c68d6acd9273b49c4d341
Added to database: 08/24/2026, 15:52:54 UTC
Last enriched: 08/24/2026, 16:07:51 UTC
Last updated: 08/24/2026, 17:01:29 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.