HIGH
crypto CAAM DMACorruption
CVE-2026-43044
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.1HIGH
01Description
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.
02KernelScan AI Analysis
Risk summary
Local users can trigger a heap buffer overflow in the CAAM crypto driver by supplying HMAC keys longer than the block size. Because the allocated buffer is smaller than the DMA cache-aligned requirement, the CAAM hardware writes the hashed key beyond the buffer boundary, corrupting adjacent kernel memory. This can lead to kernel memory modification or system crashes; it does not directly expose memory contents.
Vulnerability analysis
The vulnerability occurs in the CAAM crypto driver's HMAC key handling. When processing keys longer than the block size, the code correctly calculates DMA cache alignment requirements but fails to use the aligned size for memory allocation. Instead, it uses kmemdup() which only allocates the original key length, causing subsequent DMA operations to write beyond the buffer boundary and corrupt adjacent kernel memory. The fix replaces kmemdup with kmalloc using the properly aligned size, followed by memcpy to copy the key data safely.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.81 | c0c133e0225d |
| 6.18 | 6.18.22 | 68feed135a0c |
| 6.19 | 6.19.12 | f2af8be110bd |
| 6.6 | 6.6.134 | a7ecf06d3ee0 |
| mainline | 7.0 | 5ddfdcbe10dc |