crypto: virtio - bound the akcipher result length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a36bd0ad9fbf69d0d711b1c105954ce8d6cc144a · < 1f9f877b1ef1fbd4ee95571cddf39c8002cee252| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: virtio - bound the akcipher result length
virtio_crypto_dataq_akcipher_callback() sets the result length from the device-reported response length without bounding it to the destination buffer, which was allocated for the original request length. sg_copy_from_buffer() then reads that many bytes from the destination buffer; a backend reporting a larger length over-reads adjacent kernel heap into the caller's scatterlist (an out-of-bounds read).
Clamp the reported length to the originally requested destination length. A conforming device reports no more than that, so valid results are unaffected.
From the CVE record · Linux
The Linux kernel's virtio crypto akcipher callback trusts a device-reported result length that can exceed the allocated destination buffer. If a backend reports an oversized length, the kernel can read adjacent heap data into the caller's scatterlist. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels that use virtio crypto should check whether their kernel includes this fix; affected versions are not specified.