Executive brief
The Linux kernel's QCE (Qualcomm Crypto Engine) cryptographic module contains a memory allocation bug in the CCM (Counter with CBC-MAC) authenticated encryption implementation. When allocating a buffer for authentication data, the kernel underallocates memory, causing the hardware to read beyond the allocated buffer boundary. This results in incorrect authentication tags and cryptographic test failures, potentially compromising the integrity of encrypted communications.
Technical details
This is a buffer underallocation vulnerability in the qce_aead_ccm_prepare_buf_assoclen() function within drivers/crypto/qce/aead.c. The vulnerability stems from incorrect application of alignment: the code allocates ALIGN(assoclen, 16) + MAX_CCM_ADATA_HEADER_LEN bytes, but later programs a DMA transfer of ALIGN(assoclen + adata_header_len, 16) bytes. Since the ALIGN macro does not distribute over addition, the allocated buffer can be significantly smaller than the DMA length. For example, with assoclen=32 and adata_header_len=2, the allocation is 38 bytes while the DMA transfer is 48 bytes. The QCE hardware then reads beyond the allocated buffer, incorporating uninitialized or unrelated memory into the CBC-MAC computation, resulting in incorrect authentication tags and causing CCM self-test failures. The fix reorders the calculation to ALIGN(assoclen + MAX_CCM_ADATA_HEADER_LEN, 16), ensuring sufficient allocation for all cases. This is a non-security-critical memory safety issue that causes functional failures rather than exploitable vulnerabilities.
Affected products
- Linux Linux kernel 5.0 and later (via qce AEAD support introduced in commit 9363efb4181c)
Timeline
- 2026-09-04: disclosed: Published on NVD
- 2026-09-02: patched: Patch committed upstream by Greg Kroah-Hartman