CVE-2026-64304 Overview
CVE-2026-64304 is an out-of-bounds write vulnerability in the Linux kernel's Intel QuickAssist Technology (QAT) crypto driver. The flaw resides in qat_rsa_setkey_crt(), which handles RSA keys in Chinese Remainder Theorem (CRT) form. The generic RSA key parser in rsa_helper.c bounds each CRT component (p, q, dp, dq, qinv) by the modulus size n_sz, but the QAT driver allocates half-size DMA buffers and right-aligns each component with a memcpy call. When a CRT component exceeds half_key_sz, the pointer arithmetic underflows and the driver writes past the allocated DMA buffer, corrupting kernel memory.
Critical Impact
A local user submitting a crafted RSA key to the QAT crypto driver can trigger kernel memory corruption, potentially leading to privilege escalation or denial of service.
Affected Products
- Linux kernel builds shipping the qat crypto driver (drivers/crypto/qat)
- Distributions and stable kernel branches prior to the fixes referenced in the upstream commits
- Systems using Intel QuickAssist Technology accelerators for RSA offload
Discovery Timeline
- 2026-07-25 - CVE-2026-64304 published to NVD
- 2026-07-27 - Last updated in NVD database
Technical Details for CVE-2026-64304
Vulnerability Analysis
The vulnerability is a heap out-of-bounds write in the QAT driver's RSA CRT key setup path. Intel QAT accelerates RSA operations by consuming key material via DMA buffers. For CRT-form keys, the driver allocates buffers sized to key_sz / 2 because CRT components are mathematically expected to be at most half the modulus size. The generic parser, however, only enforces that each component is at most n_sz (the full modulus size), leaving a validation gap between parser and consumer.
When an attacker supplies a CRT component whose length exceeds half_key_sz, the driver executes memcpy(dst + half_key_sz - len, src, len). Because len > half_key_sz, the expression half_key_sz - len underflows to a very large value on unsigned arithmetic. The subsequent memcpy writes attacker-controlled bytes far outside the DMA buffer, corrupting adjacent kernel heap memory.
Root Cause
The root cause is missing bounds validation on CRT component lengths in qat_rsa_setkey_crt(). The driver trusted the generic RSA parser's bounds, but those bounds are looser than the driver's buffer allocation. The absence of a len > half_key_sz check next to the existing !len check for each of the five CRT components allowed the underflow.
Attack Vector
Exploitation requires local access with the ability to submit RSA keys through the kernel crypto API, for example via AF_ALG sockets or keyctl interfaces that route to the QAT driver. An attacker crafts an RSA private key in CRT form with at least one component (p, q, dp, dq, or qinv) larger than key_sz / 2. Submitting this key to the QAT driver triggers the underflow and out-of-bounds memcpy, corrupting kernel heap memory adjacent to the DMA allocation.
No public exploit or proof-of-concept is available. The vulnerability is described in detail in the upstream fix commits, including Linux Kernel Commit 1002719 and Linux Kernel Commit 3d61a21.
Detection Methods for CVE-2026-64304
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing qat_rsa_setkey_crt or qat_asym_algs in dmesg and /var/log/kern.log
- KASAN slab-out-of-bounds reports naming the QAT driver on kernels built with memory sanitizers enabled
- Anomalous crashes or reboots on hosts with Intel QAT accelerators shortly after user-space crypto operations
Detection Strategies
- Audit kernel version and QAT driver source against the upstream fix commits listed in the references
- Enable KASAN or SLUB debugging on non-production systems to catch out-of-bounds writes originating from the QAT path
- Monitor auditd for processes invoking AF_ALG sockets or add_key/keyctl operations that target akcipher with RSA algorithms
Monitoring Recommendations
- Forward kernel logs to a centralized log store and alert on QAT driver stack traces, RIP addresses inside qat_rsa_setkey_crt, or general protection faults following crypto syscalls
- Track uptime and crash frequency on QAT-equipped hosts, correlating spikes with unprivileged process activity
- Baseline expected consumers of the kernel akcipher interface and alert on new binaries submitting RSA keys
How to Mitigate CVE-2026-64304
Immediate Actions Required
- Apply distribution kernel updates that incorporate the upstream QAT CRT length validation fix
- Inventory hosts with Intel QAT hardware and prioritize them for patching, particularly multi-tenant systems
- Restrict access to the kernel crypto API by limiting which users can create AF_ALG sockets and invoke keyctl operations
Patch Information
The fix adds a len > half_key_sz check alongside the existing !len check for each of the five CRT components (p, q, dp, dq, qinv) in qat_rsa_setkey_crt(). When any component exceeds half_key_sz, the driver now falls back to the non-CRT path instead of performing the out-of-bounds memcpy. The fix is available in the upstream stable trees via the referenced commits, including Linux Kernel Commit 500319830d76, Linux Kernel Commit 6d99c5fa, Linux Kernel Commit 6fb62b76, Linux Kernel Commit b3ac7875, Linux Kernel Commit c3436947, and Linux Kernel Commit ce422244. Consult your distribution's advisory for the specific package version containing the backport.
Workarounds
- Blacklist the QAT crypto modules (qat_4xxx, qat_c62x, qat_dh895xcc, and related intel_qat modules) on systems where QAT acceleration is not required
- Disable user-space access to the kernel crypto API by setting CONFIG_CRYPTO_USER_API_AKCIPHER=n in custom kernel builds, or by removing the algif_akcipher module
- Apply seccomp or AppArmor profiles to untrusted workloads that block socket(AF_ALG, ...) and add_key/keyctl syscalls
# Disable the algif_akcipher module and QAT crypto drivers until patched
echo 'blacklist algif_akcipher' | sudo tee /etc/modprobe.d/cve-2026-64304.conf
echo 'blacklist qat_4xxx' | sudo tee -a /etc/modprobe.d/cve-2026-64304.conf
echo 'blacklist qat_c62x' | sudo tee -a /etc/modprobe.d/cve-2026-64304.conf
echo 'blacklist qat_dh895xcc' | sudo tee -a /etc/modprobe.d/cve-2026-64304.conf
sudo modprobe -r algif_akcipher qat_4xxx qat_c62x qat_dh895xcc 2>/dev/null
sudo update-initramfs -u
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

