crypto: qat - validate RSA CRT component lengths
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 879f77e9071f029e1c9bd5a75814ecf51370f846 · < 6fb62b767f3e27661e8f8d2f7b85f4e098fcdb1a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - validate RSA CRT component lengths
The generic RSA key parser (rsa_helper.c) bounds each CRT component (p, q, dp, dq, qinv) by the modulus size n_sz, but qat_rsa_setkey_crt() allocates half-size DMA buffers (key_sz / 2) and right-aligns each component with:
memcpy(dst + half_key_sz - len, src, len)
When a CRT component is larger than half_key_sz the subtraction underflows and memcpy writes past the DMA buffer, causing memory corruption.
Add a len > half_key_sz check next to the existing !len check for each of the five CRT components so the driver falls back to the non-CRT path instead of writing out of bounds.
From the CVE record · Linux
The Linux kernel QAT crypto driver can write past a DMA buffer when an RSA CRT key component exceeds half the key size. An attacker who can cause the driver to process such a key could trigger memory corruption. The input does not specify whether this requires local access, authentication, or user interaction.
Engineers running Linux kernels with the QAT crypto driver should check their deployments; affected versions are not specified.