crypto: caam - fix DMA corruption on long hmac keys
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: caam - fix DMA corruption on long hmac keys
When a key longer than block size is supplied, it is copied and then hashed into the real key. The memory allocated for the copy needs to be rounded to DMA cache alignment, as otherwise the hashed key may corrupt neighbouring memory.
The rounding was performed, but never actually used for the allocation. Fix this by replacing kmemdup with kmalloc for a larger buffer, followed by memcpy.
From the CVE record · Linux
The Linux kernel’s CAAM crypto code can corrupt neighboring memory when an HMAC key longer than the block size is supplied, because the buffer used for DMA is not allocated at the required aligned size. The input does not specify whether triggering this requires local access, authentication, or user interaction.
Engineers running Linux kernels with CAAM crypto should check whether their kernel is affected; affected versions are not specified.