Executive brief
The Linux kernel's virtio crypto driver contains an out-of-bounds read vulnerability in its asymmetric cipher callback handler. A malicious or compromised virtio backend device can report a result length larger than the allocated buffer, causing the kernel to read sensitive data from adjacent heap memory. This could expose confidential cryptographic material or other kernel data to attackers with control over a virtio device.
Technical details
The vulnerability exists in virtio_crypto_dataq_akcipher_callback() in drivers/crypto/virtio/virtio_crypto_akcipher_algs.c. The function processes responses from a virtio crypto device and accepts the device-reported result length without validating it against the originally allocated destination buffer size. When sg_copy_from_buffer() is called with this unchecked length, it reads beyond the buffer boundary into adjacent kernel heap memory. An attacker controlling the virtio backend (via QEMU or similar hypervisor) can exploit this by reporting an artificially inflated result length. The fix clamps the reported length to the original request length using min_t(), ensuring only valid data is copied. Patches have been applied to Linux stable branches dating back through 4.x kernels.
Affected products
- Linux Linux kernel multiple versions (fix backported to stable branches)
Timeline
- 2026-09-04: disclosed
- 2026-09-02: patched