CVE-2026-43330 in Linux
Summary
by MITRE • 05/08/2026
In the Linux kernel, the following vulnerability has been resolved:
crypto: caam - fix overflow 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 copying is performed using kmemdup, however this leads to an overflow: reading more bytes (aligned_len - keylen) from the keylen source buffer. Fix this by replacing kmemdup with kmalloc, followed by memcpy.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 09/13/2026
The vulnerability identified in the Linux kernel's CAAM (Cryptographic Acceleration and Assurance Manager) crypto driver represents a critical memory corruption issue that arises from improper handling of HMAC keys exceeding the block size limitation. This flaw specifically affects the cryptographic processing pipeline where keys longer than the standard block size undergo a transformation process involving copying and hashing operations. The underlying mechanism involves the kernel's memory management functions that handle key duplication and subsequent cryptographic operations within the hardware acceleration framework.
The technical implementation flaw stems from the use of kmemdup function in the key processing routine, which creates an overflow condition when dealing with memory allocation for key copies. When a key exceeds the block size, the system must allocate memory to accommodate the key data and ensure proper alignment for DMA operations. However, the kmemdup function incorrectly calculates the memory boundaries, leading to a situation where more bytes are read from the source buffer than actually exist, creating a buffer overflow condition. This overflow occurs because the function attempts to read beyond the allocated key length, specifically reading aligned_len - keylen bytes from a keylen-sized source buffer, which results in reading uninitialized memory or memory belonging to other data structures.
The operational impact of this vulnerability extends beyond simple memory corruption, as it creates potential attack vectors that could be exploited to compromise system integrity and data confidentiality. The flaw particularly affects systems utilizing CAAM hardware acceleration for cryptographic operations, which are prevalent in embedded systems, network appliances, and enterprise servers where high-performance cryptographic processing is required. Attackers could potentially leverage this vulnerability to execute arbitrary code, escalate privileges, or cause system instability through carefully crafted HMAC key inputs that trigger the overflow condition. The memory corruption could manifest as information disclosure, system crashes, or more sophisticated exploitation techniques that take advantage of the corrupted memory layout.
The mitigation strategy involves replacing the problematic kmemdup call with a proper two-step allocation approach using kmalloc followed by memcpy operations. This change ensures that the memory allocation accurately reflects the intended key size without the overflow condition that occurred with the original implementation. The new approach provides explicit control over memory boundaries and eliminates the risk of reading beyond the source buffer limits. Additionally, this fix aligns with secure coding practices recommended by industry standards including CWE-121, which addresses stack buffer overflow conditions, and CWE-122, which covers heap buffer overflow scenarios. The solution also corresponds to ATT&CK technique T1059.001, which involves command and scripting interpreter execution, as the vulnerability could potentially be exploited through malicious input processing that triggers the buffer overflow condition. The fix demonstrates proper memory management practices that prevent unauthorized memory access patterns and maintain the integrity of cryptographic operations within the kernel's security framework.