5.5medium
crypto: chacha20poly1305 - validate poly1305 template argument
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.16% (higher than 3% of CVEs)
- Published
- Last changed
- Assigned by
- Linux
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from a298765e28adaea199f722142c10dae7e24dedf8 before 0016d3c21c6ab60a20be7f565cefb5999f3adeb6, from a298765e28adaea199f722142c10dae7e24dedf8 before e74df53b36cdc6b6b9e5488ec883d1d55624737f, from a298765e28adaea199f722142c10dae7e24dedf8 before 265b861bece38318b8e0fc8fac0643d4ef906d31, 6.16 Not affected: before 6.16, from 6.18.39 up to 6.18.*, from 7.1.4 up to 7.1.*, from 7.2 up to * | CVE List |
| linux linux_kernel | from 6.16 before 6.18.39, from 6.19 before 7.1.4 | NVD |
Classification
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: crypto: chacha20poly1305 - validar argumento de plantilla poly1305 chachapoly_create() aún acepta el parámetro de compatibilidad poly1305 en el nombre de la plantilla, pero asume que el segundo argumento de plantilla siempre está presente y lo pasa inmediatamente a strcmp(). Cuando falta el argumento, crypto_attr_alg_name() devuelve un puntero de error. Comprobar eso antes de comparar el nombre para que las instanciaciones de plantilla mal formadas fallen con un error en lugar de desreferenciar el puntero de error en strcmp(). Esto coincide con el patrón de plantilla de la API de Criptografía circundante donde los resultados de crypto_attr_alg_name() se validan antes de su uso específico de cadena.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-64314 changed 2026-08-17 | CVE Terms of Use |
| NVD | CVE-2026-64314 changed 2026-10-24 | Public domain |