7.0high
crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()
- Severity
- 7.0high CVSS:3.1 by Linux
- Exploit likelihood
- 0.19% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP() Herbert notes that DIV_ROUND_UP() may overflow unnecessarily if an ecdsa implementation's ->key_size() callback returns an unusually large value. Herbert instead suggests (for a division by 8): X / 8 + !!(X & 7) Based on this formula, introduce a generic DIV_ROUND_UP_POW2() macro and use it in lieu of DIV_ROUND_UP() for ->key_size() return values. Additionally, use the macro in ecc_digits_from_bytes(), whose "nbytes" parameter is a ->key_size() return value in some instances, or a user-specified ASN.1 length in the case of ecdsa_get_signature_rs().
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 55779f26eab9af12474a447001bd17070f055712 before f02f0218be412cff1c844addf58e002071be298b, from c6ab5c915da460c0397960af3c308386c3f3247b before f2133b849ff273abddb6da622daddd8f6f6fa448, from c6ab5c915da460c0397960af3c308386c3f3247b before 921b8167f10708e38080f84e195cdc68a7a561f1, from c6ab5c915da460c0397960af3c308386c3f3247b before b16510a530d1e6ab9683f04f8fb34f2e0f538275, from 6.6.70 before 6.6.99, 6.10 Not affected: before 6.10, from 6.6.99 up to 6.6.*, from 6.12.39 up to 6.12.*, from 6.14.5 up to 6.14.*, from 6.15 up to * | CVE List |
| linux linux_kernel | from 6.6.70 before 6.6.99, from 6.10 before 6.12.39, from 6.13 before 6.14.5 | NVD |
All scores
| Linux | 7.0high CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP() Herbert notes that DIV_ROUND_UP() may overflow unnecessarily if an ecdsa implementation's ->key_size() callback returns an unusually large value. Herbert instead suggests (for a division by 8): X / 8 + !!(X & 7) Based on this formula, introduce a generic DIV_ROUND_UP_POW2() macro and use it in lieu of DIV_ROUND_UP() for ->key_size() return values. Additionally, use the macro in ecc_digits_from_bytes(), whose "nbytes" parameter is a ->key_size() return value in some instances, or a user-specified ASN.1 length in the case of ecdsa_get_signature_rs().
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: crypto: ecdsa - Protección contra desbordamientos de enteros en DIV_ROUND_UP(). Herbert señala que DIV_ROUND_UP() puede desbordarse innecesariamente si la función de retorno ->key_size() de una implementación de ecdsa devuelve un valor inusualmente grande. En su lugar, Herbert sugiere (para una división entre 8): X / 8 + !!(X y 7). Con base en esta fórmula, introduzca una macro genérica DIV_ROUND_UP_POW2() y úsela en lugar de DIV_ROUND_UP() para los valores de retorno de ->key_size(). Además, utilice la macro en ecc_digits_from_bytes(), cuyo parámetro "nbytes" es un valor de retorno de ->key_size() en algunos casos, o una longitud ASN.1 especificada por el usuario en el caso de ecdsa_get_signature_rs().
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-37984 changed 2026-10-15 | CVE Terms of Use |
| NVD | CVE-2025-37984 changed 2026-10-15 | Public domain |