CVE-2026-64304: crypto: qat - validate RSA CRT component lengths
In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - validate RSA CRT component lengths
The generic RSA key parser (rsahelper.c) bounds each CRT component (p, q, dp, dq, qinv) by the modulus size nsz, but qatrsasetkeycrt() allocates half-size DMA buffers (keysz / 2) and right-aligns each component with:
memcpy(dst + halfkeysz - len, src, len)
When a CRT component is larger than halfkeysz the subtraction underflows and memcpy writes past the DMA buffer, causing memory corruption.
Add a len > halfkeysz 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.
Affected Software
Remediation
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel QAT crypto driver for RSA operations with CRT-formatted keys are exposed. The vulnerable path is specifically qat_rsa_setkey_crt().
What does an attacker need to trigger the memory corruption?
An attacker needs the ability to provide or cause use of an RSA CRT key in which one or more CRT components exceeds half the modulus size. The vulnerable component lengths are p, q, dp, dq, and qinv.
What happens when an oversized CRT component is processed?
The driver calculates an offset using half_key_sz minus the component length; if the component is larger, that subtraction underflows. The subsequent memcpy can write beyond the allocated DMA buffer and corrupt memory.
What is the mitigation if the patch cannot be applied immediately?
Avoid using RSA CRT keys with the QAT driver, particularly keys whose CRT components may exceed half the modulus size. The corrected behavior rejects such CRT handling and falls back to the non-CRT path instead of performing the out-of-bounds write.
How can I identify whether the affected code path is in use?
Determine whether RSA operations are being offloaded through the Linux kernel QAT crypto driver and whether CRT-formatted RSA keys are supplied to it. The relevant function is qat_rsa_setkey_crt().