CVE-2026-64314 in Linux
Summary
by MITRE • 07/25/2026
In the Linux kernel, the following vulnerability has been resolved:
crypto: chacha20poly1305 - validate poly1305 template argument
chachapoly_create() still accepts the compatibility poly1305 parameter in the template name, but it assumes the second template argument is always present and immediately passes it to strcmp().
When the argument is missing, crypto_attr_alg_name() returns an error pointer. Check for that before comparing the name so malformed template instantiations fail with an error instead of dereferencing the error pointer in strcmp().
This matches the surrounding Crypto API template pattern where crypto_attr_alg_name() results are validated before string-specific use.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 07/25/2026
The vulnerability resides within the Linux kernel's cryptographic subsystem, specifically in the chacha20poly1305 implementation where improper validation of template arguments leads to a potential denial of service or arbitrary code execution. This flaw manifests in the chachapoly_create() function which processes cryptographic template instantiations for the ChaCha20-Poly1305 cipher suite. The issue stems from inadequate input validation when handling poly1305 template parameters, creating a scenario where malformed template specifications can trigger undefined behavior.
The technical implementation flaw occurs because the function accepts compatibility poly1305 parameter variations in template names but fails to properly validate that all required arguments are present before proceeding with string comparison operations. When the second template argument is missing, the crypto_attr_alg_name() function correctly returns an error pointer, yet the chachapoly_create() implementation does not check for this error condition before invoking strcmp() on what may be an invalid memory reference. This represents a classic null pointer dereference vulnerability that can be exploited to cause system crashes or potentially execute arbitrary code.
From an operational perspective, this vulnerability affects systems running Linux kernels that utilize the Crypto API framework and implement ChaCha20-Poly1305 cipher operations. The impact extends beyond simple denial of service as it represents a potential security escalation vector where attackers could craft malicious template instantiations to exploit the improper error handling. The vulnerability aligns with CWE-476 which describes null pointer dereference conditions, and could potentially map to ATT&CK technique T1059.008 for execution through kernel-level code injection if exploited successfully.
The fix implements proper validation of crypto_attr_alg_name() return values before any string operations are performed, following established patterns within the Linux Crypto API where all template argument results undergo validation prior to specific string handling. This defensive programming approach ensures that malformed template instantiations are properly rejected with appropriate error codes rather than allowing execution to proceed into undefined behavior. The solution maintains consistency with existing Crypto API patterns and prevents the exploitation of the race condition between template parameter validation and subsequent string operations, effectively closing the vulnerability while preserving legitimate cryptographic functionality.
This remediation addresses a fundamental security principle of input validation and demonstrates the importance of proper error handling in kernel space operations where invalid inputs can lead to system compromise. The fix reinforces the Crypto API's established design patterns and prevents similar issues from occurring in other cryptographic implementations that may follow the same template instantiation methodology.