CVE-2026-64456
High · 7.7CVSS
7.7
EPSS
0.1%
Published
Jul 25, 2026
CISA due date
—
Cloudanix analysis
A faulty or malicious virtual machine host can make some Linux guests accidentally expose small pieces of their own kernel memory through the virtual random-number device.
- Exploitation
- Local Privilege
- Attacker needs
- High Privilege
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- OS kernel
- Class
- Information Disclosure
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Medium
What it actually does
This flaw is an out-of-bounds read in the Linux kernel virtio-rng hardware random number generator driver. The driver trusts a length value reported by the virtio-rng backend and later uses it during memcpy() without rechecking that the length is within the size of the posted inline buffer. A malicious or faulty virtio-rng backend can over-report the number of bytes returned, causing the guest kernel to read past the virtio-rng buffer into adjacent kmalloc slab memory. Those unintended bytes may be mixed into the guest random-number pool and, where /dev/hwrng is accessible to privileged guest users, may be directly observed. The primary consequence is disclosure of guest kernel heap contents and contamination of RNG input; the bug may also trigger kernel memory-safety diagnostics or instability depending on configuration.
Why it matters to the business
Organizations running Linux guests with virtio-rng enabled on untrusted, compromised, or multi-tenant virtualization infrastructure may face leakage of sensitive guest kernel memory and reduced trust in guest randomness. The risk is most relevant where the hypervisor or virtio device backend is outside the same trust boundary as the guest, including confidential-computing scenarios, although many confidential-computing deployments disable virtio-rng by design. The vulnerability is not currently listed in CISA KEV, has no known public exploit maturity in the provided data, and has a low EPSS score, so broad internet-scale exploitation is unlikely; however, it matters for high-assurance virtualized workloads and environments with strict host/guest isolation requirements.
How an attack unfolds
An attacker needs control over, or the ability to influence, the virtio-rng backend presented to a Linux guest. The malicious backend completes a virtio-rng request with a used.len value larger than the actual driver buffer size. The guest virtio-rng driver stores that device-reported length and later copies data based on it without clamping the length to the posted buffer. This causes the kernel thread servicing the hardware RNG to read beyond the intended buffer into neighboring kernel heap memory. The leaked bytes can be mixed into the guest RNG pool automatically when the device is probed. If the attacker also has privileged access inside the guest, they may read /dev/hwrng and retrieve bytes that include adjacent guest kernel slab contents. Exploitation is therefore most plausible through a malicious or compromised host, hypervisor, emulator, or device backend rather than through a remote network request to the guest.
How to fix it
Upgrade to a Linux kernel build that includes the virtio-rng fix which clamps the device-reported used.len at the point of use and applies bounds-safe indexing before copying data. Where exact vendor package versions are not available, use the latest security update from the Linux distribution, kernel vendor, cloud image provider, or appliance vendor for all affected kernel branches. As a mitigation, disable virtio-rng for guests that do not require it, especially where the hypervisor or device backend is outside the guest's trust boundary. For confidential-computing workloads, verify whether virtio-rng is disabled by policy and prefer trusted in-guest or platform-approved entropy sources. Restrict access to /dev/hwrng to privileged users only, although this does not prevent the kernel-side out-of-bounds read from occurring.
How to confirm the fix worked
Confirm remediation by verifying the running kernel version includes the vendor fix for the virtio-rng used.len bounds check. Check whether the virtio-rng module or driver is present and active, for example by reviewing loaded modules, kernel device listings, and dmesg output for virtio_rng or hwrng registration. Validate exposure by confirming whether guests are configured with a virtio-rng device and whether /dev/hwrng exists. In test environments only, a controlled malicious or instrumented virtio-rng backend should no longer trigger KASAN slab-out-of-bounds reports, and bogus oversized completions should be discarded or cause a fresh request rather than copying beyond the internal buffer.
Typical attack path
- Gain control of or compromise the virtualization layer, hypervisor, emulator, or virtio-rng backend serving a Linux guest.
- Expose or keep enabled a virtio-rng device to the guest.
- Return a crafted virtio-rng completion where the device-reported used.len exceeds the size of the guest driver's internal data buffer.
- Allow the guest kernel hwrng worker to process the completion and call the vulnerable copy path.
- Cause the guest kernel to read beyond the virtio-rng buffer into adjacent kernel heap memory.
- Optionally use privileged guest access to read /dev/hwrng and observe leaked bytes, or rely on the unintended bytes being mixed into the guest RNG pool.
How to detect it
Look for signs that the virtio-rng driver experienced out-of-bounds reads or abnormal hardware RNG behavior. Useful sources include kernel logs, dmesg, system journal entries, hypervisor or emulator logs, crash dumps, KASAN reports, and guest audit logs showing unusual privileged reads from /dev/hwrng. In hardened or test kernels, exploitation may produce KASAN messages naming virtio_read, hwrng_fillfn, __asan_memcpy, slab-out-of-bounds, or kmalloc-1k. In production kernels without sanitizers, there may be no direct log evidence; focus on whether virtio-rng was enabled, whether the host or device backend was compromised, whether the guest consumed /dev/hwrng, and whether there were unexplained kernel crashes, RNG anomalies, or hwrng worker faults. Because exploitation requires a malicious or buggy backend, correlate guest indicators with hypervisor changes, emulator modifications, suspicious QEMU or vhost activity, and administrative events that altered virtual device configuration.
- BUG: KASAN: slab-out-of-bounds in virtio_read
- slab-out-of-bounds in virtio_read
- Read of size 64 at addr
- task hwrng
- hwrng_fillfn
- __asan_memcpy
- virtio_read+
- probe_common+
- virtio_dev_probe+
- kmalloc-1k
- /dev/hwrng
- virtio_rng
- virtio-rng
- hwrng/
- random_recv_done
- copy_data()
- used.len = 0x10000
What your security team should do
- Prioritize patching Linux guests that run on untrusted, shared, third-party, or less trusted virtualization infrastructure and have virtio-rng enabled.
- Inventory virtual machines and images for virtio-rng exposure, including the presence of /dev/hwrng and virtio_rng driver registration.
- Apply vendor kernel updates as they become available; where patch timing is constrained, disable virtio-rng for sensitive workloads as an interim mitigation.
- Review confidential-computing guest configurations to ensure entropy sources align with the intended host/guest trust model.
- Monitor kernel logs for memory-safety warnings involving virtio_read, hwrng_fillfn, KASAN, or slab-out-of-bounds conditions.
- Treat evidence of this bug being triggered as a potential host or virtio backend trust-boundary incident, not merely as a guest-local application issue.
The record
In the Linux kernel, the following vulnerability has been resolved: hwrng: virtio: clamp device-reported used.len at copy_data() random_recv_done() stores the device-reported used.len directly into vi->data_avail. copy_data() then indexes vi->data[] using vi->data_idx (advanced by previous copy_data() calls) and issues a memcpy() without re-validating either value against the posted buffer size sizeof(vi->data) (SMP_CACHE_BYTES bytes, typically 32 or 64). A malicious or buggy virtio-rng backend can set used.len beyond sizeof(vi->data), steering the memcpy() past the end of the inline array into adjacent kmalloc-1k slab bytes. hwrng_fillfn() mixes those bytes into the guest RNG, and guest root can also observe them directly via /dev/hwrng. Concrete impact is inside the guest: - Memory-safety / hardening: any virtio-rng backend that over-reports used.len causes the driver to read past vi->data into unrelated slab contents. hwrng_fillfn() is a kernel thread that runs as soon as the device is probed; no guest userspace interaction is required to first-trigger the OOB. - Cross-boundary leak (confidential-compute threat model): a malicious hypervisor cooperating with a malicious or compromised guest root userspace can use /dev/hwrng as a leak channel for guest-kernel heap data. The host sets a large used.len, guest root reads /dev/hwrng, and the returned bytes contain guest kernel slab contents that were adjacent to vi->data. In practice, confidential-compute guests (SEV-SNP, TDX) usually disable virtio-rng entirely, so this path is narrow, but the fix is still worth carrying because the underlying memory-safety bug contaminates the guest RNG on any host. KASAN confirms the OOB on a 7.1-rc4 guest whose virtio-rng backend has been patched to report used.len = 0x10000: BUG: KASAN: slab-out-of-bounds in virtio_read+0x394/0x5d0 Read of size 64 at addr ffff88800ae0ba20 by task hwrng/52 Call Trace: __asan_memcpy+0x23/0x60 virtio_read+0x394/0x5d0 hwrng_fillfn+0xb2/0x470 kthread+0x2cc/0x3a0 Allocated by task 1: probe_common+0xa5/0x660 virtio_dev_probe+0x549/0xbc0 The buggy address belongs to the object at ffff88800ae0b800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes to the right of allocated 544-byte region [ffff88800ae0b800, ffff88800ae0ba20) Same class of bug as commit c04db81cd028 ("net/9p: Fix buffer overflow in USB transport layer"), which hardened usb9pfs_rx_complete() against unchecked device-reported length in the USB 9p transport. With the clamp at point of use and array_index_nospec() in place, the same harness boots cleanly: copy_data() returns zero for the bogus report, the device-supplied bytes after data_idx are discarded, and the driver issues a fresh request.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|